The Dapp Details Web Service is a REST web service for obtaining metadata (such as description, tags, input variables, etc.) about a given Dapp. It is useful for, among other things, obtaining a list of fields a Dapp contains, a list of groups a Dapp contains, which inputs it takes, whether it requires login credentials, etc. It is called as follows:
http://www.dapper.net/websiteService...pName=DAPPNAME
So, for the Dapp with dappName MSNSearchResults, you would obtain its details by calling the following URL:
http://www.dapper.net/websiteService...NSearchResults
The web service returns its results in JSON format by default. You can specify an alternate format using the "mode" GET argument. Acceptable values include "json" (default), "xml", and "serialized". When "mode" is equal to "xml", the web service will return the results in XML format. When "mode" is equal to "serialized", the web service will return the results in PHP serialized format, which can be processed using the "unserialize" command in PHP (this is useful in versions of PHP which do not have json_decode). So, for example, to obtain the Dapp details in XML, you could call the following URL:
http://www.dapper.net/websiteService...sults&mode=xml
An example of the JSON format follows (some contents have been removed as they are irrelevant):
{
"dappFields":[
[
{
"fieldName":"URL",
},
{
"fieldName":"Number of Results",
"startConstraint":"of",
"endConstraint":"results",
},
{
"fieldName":"Description",
},
{
"fieldName":"Title",
}
]
],
"dappGroups":[
[
{
"groupName":"Search Result",
"dappFields":[
2,
0,
3
]
}
]
],
"dappTitle":"MSN Search Results",
"codeVersion":"209",
"dappUrls":[
"http:\/\/search.msn.com\/results.aspx?q=oranges",
"http:\/\/search.msn.com\/results.aspx?q=france",
"http:\/\/search.msn.com\/results.aspx?q=php",
"http:\/\/search.msn.com\/results.aspx?q=microsoft",
"http:\/\/search.msn.com\/results.aspx?q=jon+aizen"
],
"preMapEncoding":"utf-8",
"createDate":"2006-07-31 05:56:09",
"dappDescription":"The results of a search for a specific query at MSN",
"dappTags":[
"msn",
"search engine",
"search",
"microsoft"
],
"chocolateChip":"2697177c08812286c8326d7d90928c35",
"userId":"8",
"variableUrl":"http:\/\/search.msn.com\/results.aspx?q={Query}",
"htmlParserName":"tagsoup",
"updateDate":"2007-10-31 17:46:40",
"urlVariables":[
"Query"
]
}
Each property (e.g., "updateDate") can have as its value either a singleton value or an array, depending on the type of value. For example, "updateDate" has a string value (e.g., "2007-10-31 17:46:40"), where as "dappTags" has an array value (e.g., ["dapper", "france", "etc"]). More complex types have nested varieties of hashes, arrays, strings, and booleans. Just play with the output. A snippet of Javascript that can print all the available keys is:
A snippet of code to get all the names of all the fields is:
// assume the variable dappDetails contains the object returned by parsing the JSON string from the web service
var dappFieldNames = [];
for (i in dappDetails['dappFields'][0]) {
dappFieldNames.push(dappDetails['dappFields'][0][i]['fieldName');
}
For an example of the XML format, see:
http://www.dapper.net/websiteService...sults&mode=xml
So, in the above XML, you can access the names of the Dapp fields by accessing the following XPath:
/dapp/dappFields/dappField/dappField/fieldName
Feel free to post additional code snippets an examples in this page.
http://www.betanews.com/profile/mirdun
http://www.eons.com/members/profile/nardstern
http://www.jordinsparks.com/us/user/sudren
http://www.trulia.com/profile/ChelseaSutton/
http://militaryspot.net/SamanthaOwens
http://www.last.fm/user/MatildaGodfrey
http://getsatisfaction.com/people/eleanorhancock
http://forums.plaxo.com/member.php?u=52907
http://www.action.org.uk/forums/profile.php?id=4472
http://www.jenniferlopez.com/users/danielleconnor
http://www.v7n.com/forums/members/isabellepatterson.html
http://www.playfire.com/VictoriaHooper
http://londonist.com/profile/AbbyHolmes
http://www.danielmerriweather.com/at/users/NiamhMiller
http://www.mania.com/EveCooke/profile.html
http://forums.dzone.com/members/zaramorgan.html
http://www.tor.com/community/users/MatildaSinclair
http://www.crystalspace3d.org/forum/index.php?action=profile;u=3330
http://www.nvnews.net/vbulletin/member.php?u=118544
http://friendsite.com/HolliePatel
http://community.active.com/people/AliceCharlton
http://www.bloody-disgusting.com/forums/member.php?u=108509
http://www.ozzu.com/member/LaurenDuffy/
http://livingtrustnetwork.com/community/profile.html?userid=1313
http://www.webhostingbuzz.com/forum/members/tillydaniels.html
http://www.yourspins.com/view-user.aspx?u=2if
http://www.videomaker.com/community/forums/profile/kierawilkinson
http://www.sparknotes.com/account/AbbyGallagher
http://fhq.forumer.com/members/georginahowells.html
http://www.blogtalkradio.com/lauramiller2
http://www.brazencareerist.com/profile/nicole-hughes
http://www.webicy.com/members/alishadean.html
http://www.starvmax.com/community/profile?userid=4315
http://www.connotea.org/wiki/User:KatieBurton
http://www.soundclick.com/members/default.cfm?member=mollybolton
http://greenopolis.com/user/georgiapreston
http://www.wahm.com/forum/members/106924-brookegoddard
http://forum.m0n0.ch/index.php?action=profile;u=7016
http://www.guidespot.com/authors/elizabethbrookes
http://www.sugarcrm.com/forums/member.php?u=1176407
http://board.muse.mu/member.php?u=171576