Public Media Platform is a Hypermedia API that is accessible over HTTP, on the web and lets API clients communicate using Collection.doc+JSON media type.
Collection.doc+JSON is a recursive, generic, JSON hypermedia type optimized for flexible exchange of structured content by content providers and consumers.
In this section of the tutorial, we will give introductory examples of performing basic operations with the API. PMP development team has developed a reference SDK for the popular PHP programming environment that will be used for most examples. In some cases we may additionally provide examples of HTTP requests to further clarify how the API works.
phpsdkfolder of your working folder.
Create a file called
sdktest.php in your working folder, with the following content in it:
<?php require_once(dirname(__FILE__) . '/phpsdk/lib/Pmp/Sdk/AuthClient.php'); echo "PMP API Test Completed.\n"; exit(0);
Run the test with:
$ php sdktest.php
and make sure you get no errors. If the script runs successfully, it's an indication that SDK is downloaded and installed properly.