OR  

Character data now available in JSON and XML via the new CDS

All announcements regarding The Elder Stats website and forum are located in here.

Character data now available in JSON and XML via the new CDS

Postby Tom » April 23rd, 2015, 3:00 am

About the New Character Data Service (CDS)
For those who have an interest in having access to the specific stats and data for their characters or others' characters in The Elder Stats database in a simple and easy-to-use format, we now provide access to all characters' data in the form of both JSON and XML documents. This new service, called the Character Data Service (or CDS), is an effort to provide more open access to character data in a common, usable format to any who may wish to use it. Admittedly, the CDS will probably be more interesting to developers looking to use character data from The Elder Stats in apps (web-based or other) that they're building, but other users can benefit from having access to their characters' data in this way, as well.

Currently, only a small amount of data for each character is available in JSON and XML format, but more data will be made accessible soon.

How to Use It
To use this new service, simply make a request to the following URL:

Code: Select all
http://elderstats.com/cds?c=<character_id>

and replace <character_id> with the ID number of the character you'd like to access. For example, one of my characters, Tom, has a character ID of 8. If I wanted to access this character's stats and data in JSON format, I would access the following URL:

Code: Select all
http://elderstats.com/cds?c=8

Simple, right? :) Click here to see the result.

Now, if you want to access the data in XML format instead of the default JSON format, simply add another parameter to the URL, like so:

Code: Select all
http://elderstats.com/cds?c=<character_id>&t=xml

Notice the addition of &t=xml at the end of the URL above. This will tell the service to output the given character's data in XML format, as opposed to the default of JSON. To demonstrate, here's Tom's data in XML format instead.

Why Might I Use This?
The CDS is a simple service that was created to enable any developer who's interested in using character data from The Elder Stats in their web site or app to do so with ease. Think you might be able to create nicer-looking Stat Cards, for example? You could use the data provided by the new CDS to do just that! Want to create a better visualization of the multitude of data present in character profiles? Now you have clean and easy access to that data to get started! For developers building apps related to The Elder Scrolls games, this service can definitely be something useful, and we certainly hope that it will be!
User avatar
Tom
Founder
Knight
Founder
 
Forum Posts: 881
Characters: 2
Joined: October 18th, 2008, 8:59 pm

Re: Character data now available in JSON and XML via the new CDS

Postby Nekhron » May 21st, 2016, 2:47 pm

How do you find your characters ID? I see up in my address bar it has the following when I am on my characters page:

http://www.elderstats.com/character/5125/

So I would assume my characters ID is 5125? Am I correct?
User avatar
Nekhron
Beggar
 
Forum Posts: 10
Characters: 2
Joined: May 16th, 2016, 12:52 am
Location: Oregon, USA

Re: Character data now available in JSON and XML via the new CDS

Postby Tom » May 31st, 2016, 12:25 am

That's correct! Your character's ID is displayed in the URL for your character's profile.
User avatar
Tom
Founder
Knight
Founder
 
Forum Posts: 881
Characters: 2
Joined: October 18th, 2008, 8:59 pm


Return to Site Announcements

Who is online

Users browsing this forum: No registered users and 1 guest

© 2024 The Elder Stats - All Rights Reserved. | A project by Tom Catullo | Graphic design by Xavier Corona
All graphics taken from the Elder Scrolls games are property of Bethesda Softworks, who does not endorse and was not involved in the production of The Elder Stats.