DAIBOLA

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:sedamo:api:sedamo_api_method_account_balance [2022/03/26 15:15] – ↷ Page moved from i:sedamo:api:sedamo_api_method_account_balance to en:sedamo:api:sedamo_api_method_account_balance adminen:sedamo:api:sedamo_api_method_account_balance [2022/03/31 16:13] (current) admin
Line 1: Line 1:
 +====== API: Account/Balance ======
  
 +== Summary ==
 +Returns the account balance in credit points and the timestamp of the last update. 
 +
 +== URL == 
 +https://api.sedamo.info/2.0/account/balance 
 +
 +== Authentication == 
 +Required 
 +
 +== Parameters ==
 +  * ''apikey''
 +  * ''format'' {JSON | XML}
 +
 +== Example call == 
 +
 +<code PHP sedamo_api_method_account_balance.php>
 +<?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 
 +</code>
 +
 +
 +Example of a returned JSON object:
 +
 +<code JAVA>
 +{
 +    "status": "ok",   
 +    "access_credit": 2500889,
 +    "lastchanged": "2035-12-31 12:33:00"
 +}
 +</code>
 +
 +<code XML>
 +<?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>
 +</code>
 +
 +[[en:sedamo:api:start|Back to sedamo API start page]]