dev-master
9999999-devScoilnet SDK for PHP
MIT
The Requires
- php >=5.3.0
by Fluid-Rock
client oauth2 scoilnet
Scoilnet SDK for PHP
Scoilnet's API allows you to easily search resources from scoilnets database on you own site., (*1)
For full documentation, see Scoilnet's developer documentation, (*2)
Also check out the Scoilnet PHP SDK Demo that you can install on your own server., (*3)
Installation is a quick 4 step process:, (*4)
The preferred way to install this library is to rely on Composer.
Just check on Packagist the version you want to install (in the following example, we used "dev-master") and add it to your composer.json
:
``` js
{
"require": {
// ...
"Scoilnet/PHPSDK": "dev-master"
}
}, (*5)
Alternatively you can download the scoilnetsdk folder and add it to your project. ### Step 2: Create your cache folder For best performance a cache folder should be created that php can write too, but is not accessible by the web server. ### Step 3:Get API authentication keys from Scoilnet To use the api you will need to login too scoilnet and obtain a client id, client secret key and api key. Go to the [scoilnet api section] (https://www.scoilnet.ie/scoilnet-api) for more information on how to obtain the application keys. ### Step 4: Configuration For all requests, you must initialize the SDK with your Client ID, Client Secret and API Key. ``` php <?php require '../scoilnetsdk/ScoilnetClient.php'; $config = [ "client_id" =>"[YOUR CLIENT ID]", "client_secret" =>"[YOUR CLIENT SECRET]", "api_key" => "[YOUR API KEY]", ]; $this->scoilnetClient = new \ScoilnetSDK\ScoilnetClient($config); //Set the cache folder that you created in step3 $this->scoilnetClient->setCacheFile("/var/www/searchAPI/Cache/"); //See [scoilnet search documentation] (https://www.scoilnet.ie/scoilnet-api/documentation) for list of possible paramater options $params = array(); //Make a search request $response = $this->scoilnetClient->search($params);
Scoilnet SDK for PHP
MIT
client oauth2 scoilnet