For all the API calls, you must first obtain an access token. The access token is used to create an instance of the SDK which allows you to access the SDk methods.
Code Sample
SdkClient.new(session[:access_token])
Examples
account_info
account_info retrieves account information. This call returns the output in following json format:
Code Sample
begin
entry = client.account_info()
rescue SdkAuthError => e
session.delete(:access_token) # An auth error means the access token is probably bad
return html_page "Sdk auth error"
rescue SdkError => e
if e.http_response.code == '404'
return html_page "Path not found: #{h path}"
else
return html_page "Sdk API error #{e}"
end
end