Returns the account balance in credit points and the timestamp of the last update.
Required
apikey
format
{JSON | XML}<?php $apikey = "TestTestTestTestTestTestTestTestTestTest"; $format = "JSON"; $url = "https://api.sedamo.info/2.0/account/balance?apikey=$apikey&format=$format"; $json = file_get_contents($url); $json_array = json_decode($json, true); // 2nd parameter "true": returns result as an array var_dump($json_array); // shows array
Example of a returned JSON object:
{ "status": "ok", "access_credit": 2500889, "lastchanged": "2035-12-31 12:33:00" }
<?xml version="1.0" encoding="UTF-8"?> <sedamo> <status>ok</status> <access_credit>2500889</access_credit> <lastchanged>2035-12-31 12:33:00</lastchanged> </sedamo>