Software, Computers, Video Games and D&D UtilitiesGeneral discussion on computer software and hardware, PC and console games, and RPG utilities such as eTools, PC GEN, etc.
Exclusive details on the DDI API (not a repeat...)
I've figured out some exclusive details on how to programatically query the compendium. Details on my blog.
Copied and pasted, but I'm too lazy to redo it in BB code.
So to cut a short (but uninteresting) story even shorter, I stumbled onto a way to get XML results from Compendium searches, opening the door for people to run queries against the compendium programatically. For example, I’ve just updated my Monster Maker with the ability to search the compendium for monsters and import them (this was previously available, but more complicated as you had to save the monsters to an HTML file and then import that…).
You can query that URL using either GET or POST If you don’t know what those are, you’re probably best off using GET, which I’ll describe.
The two parameters which seem to be necessary are “Keywords” and “tab” (I don’t think case matters, but that’s the case I’m using and it works…). Keywords is what you’re searching for, and tab is the type of results you want.
For example, to search for mind flayers, you’d look up:
For some info on actually running queries, check out Gaming in Code, a blog run by one of the guys working on DDI. I haven’t tested to make sure that all those filters and such actually work with this, but I strongly suspect they do.
Note that the space was escaped to %20. I’m pretty sure you can NOT replace spaces with +. I haven’t tried dashes or underscores.
That %20 is the escaping of a space in a URI. See RFC 1630 for more details, or check out any of many references online (e.g. 4.1.2. Unsafe characters)
You might want to be careful before going too far down the line of figuring out the APIs. As soon as they include access protection, or if they may be considered reverse engineering, that might subject you to the DMCA. You might also have to deal with issues of unauthorized access if those aren't a part of a public API.
I'd have to do some research figure out what is allowed or not. This is probably a good opportunity to invest in understanding the DMCA, as well as finding out the WotC policy for how one is allowed to access their web site.
That %20 is the escaping of a space in a URI. See RFC 1630 for more details, or check out any of many references online (e.g. 4.1.2. Unsafe characters)
I know... That would be why I escaped it thusly.
Quote:
You might want to be careful before going too far down the line of figuring out the APIs. As soon as they include access protection, or if they may be considered reverse engineering, that might subject you to the DMCA. You might also have to deal with issues of unauthorized access if those aren't a part of a public API.
I'd have to do some research figure out what is allowed or not. This is probably a good opportunity to invest in understanding the DMCA, as well as finding out the WotC policy for how one is allowed to access their web site.
Thx!
TomB
For a variety of reasons, I'm both not worried about any legal issues and also not worried about them taking umbrage with this use. In fact, I have good reason to believe that this is exactly what they're intending.
Of course, if they do have a problem they can email me and I'll take down anything at their request. But I seriously doubt that's going to happen.
I thnk wotc should publish a developer API or something. I have a really great idea fir an iPhone app for D&D gamers - the only thing stopping me from seriously working on it is that I would like to be able to query for info.
You know what I would really like? A way to have someones character info from the character builder made available via web site, like the character sheet hosting that some sites provided in 3.x. If I could prompt someone for their DDI account and then grab parts of their character info to use in my app that would be awesome.
__________________
LONG LIVE 4E
Known as ObiWayneKenobi (formerly WayneTheGame) on the Wizards forums.
This is the internet, not kindergarten. If you can't deal with what people say, get off the playground.
I thnk wotc should publish a developer API or something. I have a really great idea fir an iPhone app for D&D gamers - the only thing stopping me from seriously working on it is that I would like to be able to query for info.
You know what I would really like? A way to have someones character info from the character builder made available via web site, like the character sheet hosting that some sites provided in 3.x. If I could prompt someone for their DDI account and then grab parts of their character info to use in my app that would be awesome.
__________________ All we want to do is eat your brains
We’re not unreasonable; I mean, no one’s gonna eat your eyes
All we want to do is eat your brains
We’re at an impasse here; maybe we should compromise:
If you open up the doors
We’ll all come inside and eat your brains
Kind of like that, yes. My iPhone idea is at first a hit point tracker, so it will tell you when you're bloodied and whatnot... nothing major just something simple... I figure even if I can't sell it for money I can use it myself and learn iPhone programming
If it could read/write to 4e character builder files then it could pull your powers and function like virtual power cards; you pull up your character, tap a power and it displays your bonuses and the like with it. But that's wishful thinking on my part right now.
__________________
LONG LIVE 4E
Known as ObiWayneKenobi (formerly WayneTheGame) on the Wizards forums.
This is the internet, not kindergarten. If you can't deal with what people say, get off the playground.
My word... the possibilities. Scott, is there any way the DDI API could be public so we can make apps for DDI subscribers?
Consider the benefits: each tool made by third-parties is value-add to a DDI subscription that required no resources on WotC's part. For me, I would kill to be able to make an encounter builder that exported colored stat-blocks to PDF. And I'd do it in a heart-beat if I thought distributing such a thing was explicitly approved by WotC.
__________________ My D&D Class: Lawful Good Human Paladin
My Robin's Laws Game Style: 100% Method Actor, 92% Storyteller, 92% Specialist (paladin), 83% Butt-Kicker, 75% Tactician, 67% Power Gamer, 17% Casual Gamer
Considering how legal happy things have been over the last bit, I will be interested to see getting access to the data in the next Gaming in Code article because according to the terms of use when you sign up you agree not to do this.
3. Limits on Use of the Site
You agree not to engage in any of the following: (i) use any automated means, including, without limitation, agents, robots, scripts, or spiders, to access, monitor, data scrape, copy or transfer any part of the Site (including without limitation any User data, including any Member registration information, whether individually or in the aggregate); (ii) probe, scan or test the vulnerability of the Site, or breach the security or authentication measures on the Site; (iii) reverse look-up, trace or seek to trace any information on any Member or other User of the Site, including information on any Member account other than your own, to its source, or exploit the Site in any way with a purpose of revealing any information, including but not limited to personal identification or information, other than your own information; (iv) take any action that imposes an unreasonable or disproportionately large load on the infrastructure of the Site; (v) use any device, software or routine to interfere or attempt to interfere with the proper working or authorized uses of the Site or with any other person's use of the Site; (vi) forge headers or otherwise manipulate identifiers in order to disguise the origin of any message transmittal you send on or through the Site; (vii) impersonate any other individual or entity or misrepresent your identity or your affiliation with another individual or entity; (viii) use the Site in an illegal manner or for any unlawful purpose; or (ix) violate any applicable Guidelines, including without limitation any Code of Conduct.
If this is now not the case, then I hope that these terms will be amended.
My word... the possibilities. Scott, is there any way the DDI API could be public so we can make apps for DDI subscribers?
Consider the benefits: each tool made by third-parties is value-add to a DDI subscription that required no resources on WotC's part. For me, I would kill to be able to make an encounter builder that exported colored stat-blocks to PDF. And I'd do it in a heart-beat if I thought distributing such a thing was explicitly approved by WotC.
Exactly. WotC could really capitalize on D&DI by having a "Developer API" that we can use to create applications that make use of D&DI info; sort of like a D&D App Store.
__________________
LONG LIVE 4E
Known as ObiWayneKenobi (formerly WayneTheGame) on the Wizards forums.
This is the internet, not kindergarten. If you can't deal with what people say, get off the playground.
Considering how legal happy things have been over the last bit, I will be interested to see getting access to the data in the next Gaming in Code article because according to the terms of use when you sign up you agree not to do this.
If this is now not the case, then I hope that these terms will be amended.
Exactly. And in the member terms of service for DDI it says in the first paragraph
that "In the event of a conflict between these Member Terms and the TOU, these Member Terms shall control."
Quote:
These Member Terms of Service (“Member Terms”) are a contract between you and Wizards of the Coast, Inc. ("Wizards"), and apply to your registration for and use of products and services (collectively the "Service") available to registered users or paying subscribers ("Members") through the Wizards website (the "Site"), and supplement the Wizards Website Terms of Use applicable to the Site ("TOU"). In the event of a conflict between these Member Terms and the TOU, these Member Terms shall control. The purchase or use of certain products and services available through the Site by Members may also be subject to certain additional terms and conditions.
There is a section under "2.User Content; Intellectual Property Ownership; Rights Granted to You":
Quote:
b. Intellectual Property Ownership; Rights Granted to You The Service is the proprietary property of Wizards or its licensors, and is protected by copyright, trademark, and other intellectual property laws. Except as otherwise provided herein, you are granted a limited, non-sublicenseable license to access and use the Service (except where specified as prohibited) for your personal, noncommercial use only; provided, that you preserve any copyright, trademark or other similar notices contained in or associated with such Service. You agree not to use the Service in an illegal manner or for any unlawful purpose. Such license is subject to these Member Terms and does not include: (a) any resale or commercial use of the Service therein; (b) modifying or otherwise making any derivative uses of the Service, or any portion thereof; or (c) any use of the Service other than for its intended purpose. Any use of the Service other than as specifically authorized herein, without the prior written permission of Wizards, is strictly prohibited and will terminate the license granted herein. This license is revocable at any time.
I am not a lawyer, but, It does not specifically allow one to automate extraction of data, so my question still stands.
My reading (I could be wrong though) indicates that you have personal use except in the case of derivative use, any use other than the intended purpose, or any resale or commercial use. I think the derivative uses clause is the most worrisome to me. I'd like some clarification that this is going to be fine. I am hoping you are right and I am giving them the benefit of the doubt (especially because Scott posted here).
Scott, can this be clarified? Is using this API going to be ok for private DDI users to use the data?
As long as you're not doing it for profit, you won't get sued. I promise. Worst case scenario, they'll send you a C&D.
But just look. They've already started documenting the API themselves (which is what lead to my getting interested in it in the first place). At the end of that post on Gaming in Code, he said the next part would cover how to programatically access the data. The only issue is that it's taken to freaking long for the second part to come out.
And now The Rouse is here saying that the next part (Coincidentally? Or did I give them a kick in the butt? ) will be up Monday.
It is absolutely clear that this is what Wizards of the Coast wants people to do.
As long as you're not doing it for profit, you won't get sued. I promise. Worst case scenario, they'll send you a C&D.
But just look. They've already started documenting the API themselves (which is what lead to my getting interested in it in the first place). At the end of that post on Gaming in Code, he said the next part would cover how to programatically access the data. The only issue is that it's taken to freaking long for the second part to come out.
And now The Rouse is here saying that the next part (Coincidentally? Or did I give them a kick in the butt? ) will be up Monday.
It is absolutely clear that this is what Wizards of the Coast wants people to do.
Yeah, I guess you are right. That is what has been done thus far is to send C&Ds. But I figured they'd go to account banning before that if you were automating the extraction of data and they didn't like it. The only reason I had not taken an interest thus far was to avoid getting my account removed for automating access to it - something I'd not like to happen if I'd paid for an extended amount of access to DDI.
Thanks for bringing up the topic. Hopefully, this is a good step and as I said, I look forward to the upcoming article about it.
Last edited by miscreationist; 18th June 2009 at 06:46 PM..