Codebookie’s API is extremely easy to use.
All you need to do is POST data to this base URL:
https://members.codebookie.com/api/v1
For example, using php if you wish to list your associated websites you would POST to this URL along with the required JSON data
https://members.codebookie.com/api/v1/websites/list
Here’s a very basic connection using PHP and CURL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
$url = "https://members.codebookie.com/api/v1/"; $interface = 'websites/list'; $dataArray = array( 'api_token'=>APITOKEN ); $jsonData = json_encode($dataArray); $ch = curl_init($url.$interface); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($jsonData))); $result = curl_exec($ch); print_r($result); |
$result will return the list of websites in your account in JSON.