dev-master
9999999-dev http://www.multinet.se/EduAdmin - PHP API Client
GPL-3.0-or-later
The Requires
- php >=5.2
- composer/installers ~1
Wallogit.com
2017 © Pedro Peláez
EduAdmin - PHP API Client
Include eduadmin-api-client.php in the pages you want to be able to use the API-client
against EduAdmin, (*1)
This will enable the global command EDUAPI(), which is a singleton instance of the client., (*2)
Don't forget to call EDUAPI()->SetCredentials( $api_user, $api_pass ) and then fetch a token by
calling EDUAPI()->GetToken()., (*3)
This token is currently valid for two weeks, so save it somewhere safe. (And never ever show it to the public), (*4)
The token has a function to check its validity, but only against expiration. So, keep track if you get errors from the API, then you should request a new token., (*5)
Here's a list of the current endpoints in the OData-property, (*6)
All these endpoints support the functions:, (*7)
...->Search(
$select, // Nullable, adds the $select-parameter
$filter, // Nullable, adds the $filter-parameter
$expand, // Nullable, adds the $expand-parameter
$orderby, // Nullable, adds the $orderby-parameter
$top, // Nullable, adds the $top-parameter
$skip, // Nullable, adds the $skip-parameter
$count // Boolean, if true, adds number of records to result
)
...->GetItem(
$id, // The ID (Integer) of the resource you're getting
$select, // Nullable, adds the $select-parameter
$expand // Nullable, adds the $expand-parameter
)
The OData-endpoints inherits from EduAdminODataClient, that inherits from EduAdminRESTClient, but this class,
explicitly forbids you from using the GET, POST, PATCH, PUT and DELETE methods., (*8)
The current endpoints in the REST-property is:, (*9)
Each of these endpoints contain their own methods, but it also inherits from EduAdminRESTClient, so you will have
access to GET, POST, PATCH, PUT and DELETE methods., (*10)
You can check out the API documentation yourself, if you want to make something yourself., (*11)
EduAdmin - PHP API Client
GPL-3.0-or-later