#MASH REST API SDK for PHP
This is currently under development. Drastic changes may occur.
This can only be used by approved applications allowed to use MASH.
- curl
Create a new api instance using the token given by MASH:
$api = new MashApi($token, $url);
A url can be specified if it doesn't match the default one.
To test if is working:
print_r($api->test());
Should return information about the application making the request.
Get some participants:
$participants = $api->getParticipants(array(
'country' => 'prt',
'num' => 10,
));
$payload should always be a key=>value array using the arguments specified in the documentation.
Get a list of participants:
$api->getParticipants($payload);
Create a participant:
$api->createParticipant($payload);
Get a specific participant:
$api->getParticipant($uuid, $payload);
Add usage to a participant:
$api->addUsage($uuid, $payload);
Remove usage from a participant:
$api->removeUsage($uuid, $payload);