Diablo® III

Where to learn api and json on the web?

Posts: 15
I been trying to use multiple different search filters and I can't find a decent tutorial on how to use api that (not sure of proper terminology) converts data into json

I learn pretty well with anything, but I want to make sure I'm learning the right stuff.

I think the way https://github.com/XjSv/Diablo-3-API-PHP works is it grabs whatever profile was searched and puts it into a json format...

I'm trying to get that json format into mysql databases and stuff..

Yes I might sound stupid the way I'm wording this, but any help would be great. Thanks!
Edited by HeavensGate#1114 on 11/9/2012 8:26 AM PST
Reply Quote
idk
Reply Quote
Hi,

I don't think there's any good tutorial about D3 API on the web, but the official http://blizzard.github.com/d3-api-docs/ is a good place to start.

Get the JSON data requesting the proper URL, then convert it into an object with the json_decode (or equivalent) method of your favorite programming language.

Then you can do your own manipulations...

Enjoy !

PS: I'm using the API for an analysis tool at www.diabloz.com
Edited by Lxir#2890 on 11/12/2012 6:02 AM PST
Reply Quote
11/09/2012 08:26 AMPosted by HeavensGate
I been trying to use multiple different search filters and I can't find a decent tutorial on how to use api that (not sure of proper terminology) converts data into json


The data is *already* in JSON format. If you're using javascript you can just do JSON.parse(response_from_api), other languages all have their own way of doing JSON.parse.


I learn pretty well with anything, but I want to make sure I'm learning the right stuff.

I think the way https://github.com/XjSv/Diablo-3-API-PHP works is it grabs whatever profile was searched and puts it into a json format...


Are you yourself using PHP to access the API?


I'm trying to get that json format into mysql databases and stuff..


To what end? What goal are you trying to accomplish? You'll need the correct database tables mapped to objects from the API, and then some kind of server-side or scripting language to take the JSON and INSERT it into the database tables correctly. But again, what goal are you trying to accomplish? What programming experience do you have?

You need to give more details about what you're trying to do if you want help...

On that note you can see my spreadsheet which implements a profile import using blizzard's API: https://www.youtube.com/watch?v=3GmsxVuny6c&feature=plcp

And the coffeescript that accomplishes the importing: https://gist.github.com/3779098
Edited by Zifnab#1615 on 11/13/2012 11:39 AM PST
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)
Submit Cancel

Reported!

[Close]