Menu
News
All News
Dungeons & Dragons
Level Up: Advanced 5th Edition
Pathfinder
Starfinder
Warhammer
2d20 System
Year Zero Engine
Industry News
Reviews
Dragon Reflections
White Dwarf Reflections
Columns
Weekly Digests
Weekly News Digest
Freebies, Sales & Bundles
RPG Print News
RPG Crowdfunding News
Game Content
ENterplanetary DimENsions
Mythological Figures
Opinion
Worlds of Design
Peregrine's Nest
RPG Evolution
Other Columns
From the Freelancing Frontline
Monster ENcyclopedia
WotC/TSR Alumni Look Back
4 Hours w/RSD (Ryan Dancey)
The Road to 3E (Jonathan Tweet)
Greenwood's Realms (Ed Greenwood)
Drawmij's TSR (Jim Ward)
Community
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Resources
Wiki
Pages
Latest activity
Media
New media
New comments
Search media
Downloads
Latest reviews
Search resources
EN Publishing
Store
EN5ider
Adventures in ZEITGEIST
Awfully Cheerful Engine
What's OLD is NEW
Judge Dredd & The Worlds Of 2000AD
War of the Burning Sky
Level Up: Advanced 5E
Events & Releases
Upcoming Events
Private Events
Featured Events
Socials!
EN Publishing
Twitter
BlueSky
Facebook
Instagram
EN World
BlueSky
YouTube
Facebook
Twitter
Twitch
Podcast
Features
Top 5 RPGs Compiled Charts 2004-Present
Adventure Game Industry Market Research Summary (RPGs) V1.0
Ryan Dancey: Acquiring TSR
Q&A With Gary Gygax
D&D Rules FAQs
TSR, WotC, & Paizo: A Comparative History
D&D Pronunciation Guide
Million Dollar TTRPG Kickstarters
Tabletop RPG Podcast Hall of Fame
Eric Noah's Unofficial D&D 3rd Edition News
D&D in the Mainstream
D&D & RPG History
About Morrus
Log in
Register
What's new
Search
Search
Search titles only
By:
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Menu
Log in
Register
Install the app
Install
Community
General Tabletop Discussion
*Geek Talk & Media
Exclusive details on the DDI API (not a repeat...)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="lacan2002" data-source="post: 4861500" data-attributes="member: 61054"><p>Hey, great thread! Any ideas on a general place to talk about DDI Api?</p><p>Seems like there are a number of interested D&D player/programmers out here, it would be nice to have a place for the hobbyist to share ideas.</p><p></p><p>It looks like they've added a needed NameOnly parameter, which I've just been setting to "false".</p><p></p><p>Thanks very much to Asmor's examples, I got a simple ruby client working.</p><p></p><p>For the interested, this requires the excellect <a href="http://xml-object.rubyforge.org/doc/" target="_blank">xml-object</a> and <a href="http://rest-client.heroku.com/rdoc/" target="_blank">restclient</a> gems, but once those are ready, getting an implicit object model that allows you to deal with the meat of the data is dead simple:</p><p></p><p>[code]xml = RestClient.get('http://www.wizards.com/dndinsider/compendium/CompendiumSearch.asmx/KeywordSearch?Keywords=mind+flayers&tab=Monster&NameOnly=false')</p><p>data = XMLObject.new(xml) # That's it! Gives us a model implicitly!</p><p></p><p># get each monster and show some data</p><p>data.Results.Monster.each do |monster|</p><p> puts "#{monster.Name} is found in #{monster.SourceBook}"</p><p> # do something more interesting, like put into a ul in HTML</p><p>end[/code]</p><p></p><p>The results for this look like this:</p><p></p><p>Mind Flayer Infiltrator is found in Monster Manual</p><p>Mind Flayer Mastermind is found in Monster Manual</p></blockquote><p></p>
[QUOTE="lacan2002, post: 4861500, member: 61054"] Hey, great thread! Any ideas on a general place to talk about DDI Api? Seems like there are a number of interested D&D player/programmers out here, it would be nice to have a place for the hobbyist to share ideas. It looks like they've added a needed NameOnly parameter, which I've just been setting to "false". Thanks very much to Asmor's examples, I got a simple ruby client working. For the interested, this requires the excellect [URL="http://xml-object.rubyforge.org/doc/"]xml-object[/URL] and [URL="http://rest-client.heroku.com/rdoc/"]restclient[/URL] gems, but once those are ready, getting an implicit object model that allows you to deal with the meat of the data is dead simple: [code]xml = RestClient.get('http://www.wizards.com/dndinsider/compendium/CompendiumSearch.asmx/KeywordSearch?Keywords=mind+flayers&tab=Monster&NameOnly=false') data = XMLObject.new(xml) # That's it! Gives us a model implicitly! # get each monster and show some data data.Results.Monster.each do |monster| puts "#{monster.Name} is found in #{monster.SourceBook}" # do something more interesting, like put into a ul in HTML end[/code] The results for this look like this: Mind Flayer Infiltrator is found in Monster Manual Mind Flayer Mastermind is found in Monster Manual [/QUOTE]
Insert quotes…
Verification
Post reply
Community
General Tabletop Discussion
*Geek Talk & Media
Exclusive details on the DDI API (not a repeat...)
Top