Skip to content

flipside-org/mash-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#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.

Requirements

  • curl

Quick start

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,
));

Endpoints

$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);

Releases

No releases published

Packages

No packages published

Languages