Skip to content

Methods & parameters

Luís Gustavo edited this page Jun 28, 2018 · 112 revisions

THIS DOCUMENTATION WILL CONSUME A JSON RESPONSE.

Contents

  1. Create Session
  2. Ping
  3. Test Session
  4. Get Player

Connectivity

Create Session

/createsession[ResponseFormat]/{devID}/{signature}/{timestamp}
A required step to Authenticate the developerId/signature for further API use.

Parameter Description Example
ResponseFormat JSON or XML json
devID Your devID from your application request 1004
signature The [Signature](https://github.com/apugh/realm-api-proposal/wiki/Getting-Started#timestamp) for CreateSession method c332691773af33948c9ddb12e5fb444f
timestamp The current [timestamp](https://github.com/apugh/realm-api-proposal/wiki/Getting-Started#timestamp) 20180628012612



Request: http://api.realmroyale.com/realmapi.svc/createsessionjson/1004/c332691773af33948c9ddb12e5fb444f/20180628012612

Response: JSON

{
    "ret_msg": "Approved",
    "session_id": "1465AFCA32DBDB800CEF8C72F296C52C",
    "timestamp": "6/28/2018 1:26:12 AM"
}

Ping

/ping[ResponseFormat]

A quick way of validating access to the Realm Royale API.

Request: http://api.realmroyale.com/realmapi.svc/pingjson

Response: TEXT PLAIN

RealmAPI (ver 1.0.0.0) [PATCH - ] - Ping successful. Server Date:6/28/2018 1:26:12 AM

Test Session

/testsession[ResponseFormat]/{developerId}/{signature}/{session}/{timestamp}

A means of validating that a session is established.

Request: http://api.realmroyale.com/realmapi.svc/testsessionjson/1004/c332691773af33948c9ddb12e5fb444f/1465AFCA32DBDB800CEF8C72F296C52C/20180628012612

Response: TEXT PLAIN

This was a successful test with the following parameters added: developer: 1004 time: 6/28/2018 1:26:12 AM signature: c332691773af33948c9ddb12e5fb444f session: 1465AFCA32DBDB800CEF8C72F296C52C

APIs

Get Player

/getPlayer[ResponseFormat]/{developerId}/{signature}/{session}/{timestamp}/{player}/hirez