dev-master
9999999-devWrap the Second Life World API.
The Requires
- php >=5.3.0
The Development Requires
by Solo Mornington
Wallogit.com
2017 © Pedro Peláez
Wrap the Second Life World API.
WorldAPI is a PHP consumer of the World API from Second Life., (*3)
SL's World API gives the aspiring web scraper a lot of info about Second Life residents, places, and groups., (*4)
WorldAPI (no space... see?) wraps all that up in a handy PHP object., (*5)
The Second Life World API documentation is here: https://wiki.secondlife.com/wiki/World_API, (*6)
WorldAPI needs: cURL and DOM PHP extensions, and PHP 5 (since it's a set of classes)., (*7)
WorldAPI is a packagist package: https://packagist.org/packages/mornington/worldapi, (*8)
You can use it with your project through Composer: http://getcomposer.org/, (*9)
The standard way to install composer is:, (*10)
cd to your project directory., (*11)
Install composer: curl -s https://getcomposer.org/installer | php, (*12)
Have composer generate a generic composer.json file: php ./composer.phar init, (*13)
Tell composer to install/update dependencies: php ./composer.phar -v -o update, (*14)
To include WorldAPI in your project, add something like this to your dependencies, in composer.json:, (*15)
"require": {
"mornington/worldapi": "dev-master"
}
The demo.php file has some example usage., (*16)
Basically, instantiate one of the WorldAPI subclasses, passing a UUID as the single argument., (*17)
Then call the worldAPI() function on that object and you'll have a handy array with the various meta fields as keys., (*18)
Here's how you'd show Solo Mornington's maturity rating:, (*19)
$resident = new WorldAPIResident('6d286553-59ae-409a-887d-ee75df67b834');
$data = $resident->worldAPI();
echo $data['mat'];
It's happy and friendly and GNU licensed., (*20)
The official repository for WorldAPI is on github. Of course, everyone's welcome to join in with bug reports and pull requests., (*21)
https://github.com/SoloMornington/WorldAPI, (*22)
I'm Solo Mornington on Second Life. I'm working on this as part of a project for the Linden Endowment For The Arts. http://www.lea-sl.org, (*23)
You can contact me through my github page, or on Second Life., (*24)
Wrap the Second Life World API.