Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

WebAPI

LionasLionas Member, Historian Posts: 765 ✭✭✭✭✭
edited October 2013 in Scripting
Can I (we) get a bit more information about the IRE web api? I had never seen it mentioned until Garryn posted about it today, even though it appears to have existed for some time.
I had to guess that the base URI was api.imperian.com -- what other secrets are out there?

Specific questions:
  • What URIs are used for OAuth requests? The two standard locations I know of (/oauth/request_token and /accounts/OAuthGetRequestToken) both failed.
  • Does additional functionality exist not mentioned in http://www.ironrealms.com/IREAPIdocumentation.pdf
  • If not, are you open to adding functionality?

Edit to add one more

  • Why is plaintext auth an option when the site doesn't allow HTTPS for api requests?
  • Follow-up - why doesn't the site allow HTTPS for api requests?
I am the righteous one... 
the claims are stated - it's the world I've created 
Tagged:

Comments

  • DiceneDicene Member Posts: 913 ✭✭✭✭
    Ooh. I feel like reading raw gamefeed would be cool as hell. No more worrying about crazy custom deathglories! Oh. Shardfalls need to be on gamefeed!
    image
  • RynokRynok Member Posts: 19
    API's are amazing, and I'm happy you all have an API for the game. I'm hesitant to send my password across the net without HTTPS though.

    Along the same lines as my other thread that's related to this, functionality I'd ask for would be: /characters.json (list of player names in Imperian currently in existence)
    What would be even greater then that is the basic stats about each character (level/race/city): /characters.json?verbose=true
  • LionasLionas Member, Historian Posts: 765 ✭✭✭✭✭
    edited October 2013
    Ideally we have the OAuth method to authenticate with a token and handle the initial transfer of creds via an SSL channel. Once you have the OAuth tokens, there's no longer a need for SSL, reducing the load on the server and allowing stateful auth.

    I can't find the page for oauth initialization, though.

    As for detailed information about players, that would make the full characters output a bit larger than they probably want for a single API get. You can take the list you retrieve and make individual /characters/<char>.json requests, though:

    http://api.imperian.com/characters/rynok.json
    {"name":"Rynok","fullname":"Rynok Reopev","city":"antioch","guild":"avengers","towne":"(none)","level":"104","bashing_level":"106","questing_level":"81","pk_level":"70","description":"He is a fast ssylsin. Standing a little over five feet tall, his reptilian scales give off a dull dark green color, softly fading to brown along his underbelly and a light green on his face. Both his face and hands are made of very fine scales, interlaced to form a diagonally overlapping pattern. On his upper right arm, starting a little above his elbow, you can make out what looks to be a black wing that fades away and becomes a light mist. A little further up you see the head of what looks to be an owl portrayed in mid flight. The owl's bright blue almost lifelike eye seems to glare at you. He is wearing an Illuminas ring, 14 pocketbelts, a money pouch, a ring of Aryana's Bounty, a glittering ring of vitality, a eupnoeic ring, Acrobatic Boots, a black Reopev armband, a Collar of Pyralis, a pair of Ogre's Gauntlets, a silver keyring, a steelweave surcoat, a ring of Magick's Bane, a Diadem of the Quickening, a deep green robe of power, a gold Taekate belt, goggles of whitesight, a Girdle of the Titans, a Sash of Wisdom, a suit of chain mail, a pair of Bracelets of Epiphany's Grace, and a ring of Epiphany's Gift. He wields a silver-spiked spear in his left hand.\n"}

    EDIT: And your all characters call would need to be something other than "characters", as that already exists (and fetches those online). Probably something like /data/characters or something. Adding a general "data" sub-category to the API would be neat.
    I am the righteous one... 
    the claims are stated - it's the world I've created 
  • RynokRynok Member Posts: 19
    Yeah, I can make it individually...but given the option I'd rather one large API response instead of 500 small responses. I didn't want to spam API calls because I need a small set of data for each player was all, don't know what's best for that.
  • IniarIniar Member Posts: 3,213 ✭✭✭✭✭
    Where would be a good place to start learning about these things? (True noob) OAuth, authentication, tokens, SSL. :s foreign language to me :p
    wit beyond measure is a Sidhe's greatest treasure
  • LionasLionas Member, Historian Posts: 765 ✭✭✭✭✭
    edited October 2013
    Plain english introduction to OAuth -- http://blog.varonis.com/introduction-to-oauth/
    Wiki article here: https://en.wikipedia.org/wiki/OAuth
    Twitter's faq here (it was originally developed primarily for twitter apps to auth with twitter): https://dev.twitter.com/docs/auth/oauth/faq

    SSL is the security mechanism in HTTP Secure (HTTPS) (actually, TLS is used more than SSL these days).
    https://en.wikipedia.org/wiki/Secure_Sockets_Layer
    https://en.wikipedia.org/wiki/HTTP_Secure
    I am the righteous one... 
    the claims are stated - it's the world I've created 
  • IniarIniar Member Posts: 3,213 ✭✭✭✭✭
    Lionas said:
    Plain english introduction to OAuth -- http://blog.varonis.com/introduction-to-oauth/
    Wiki article here: https://en.wikipedia.org/wiki/OAuth
    Twitter's faq here (it was originally developed primarily for twitter apps to auth with twitter): https://dev.twitter.com/docs/auth/oauth/faq

    SSL is the security mechanism in HTTP Secure (HTTPS) (actually, TLS is used more than SSL these days).
    https://en.wikipedia.org/wiki/Secure_Sockets_Layer
    https://en.wikipedia.org/wiki/HTTP_Secure
    Thank you :)
    wit beyond measure is a Sidhe's greatest treasure
  • IniarIniar Member Posts: 3,213 ✭✭✭✭✭
    That is so cool. Reading about TLS. Thanks @Lionas.
    wit beyond measure is a Sidhe's greatest treasure
  • LionasLionas Member, Historian Posts: 765 ✭✭✭✭✭
    Is there a reason the entries in the URI field are escaped? JSON certainly doesn't require them to be.
    I am the righteous one... 
    the claims are stated - it's the world I've created 
Sign In or Register to comment.