summaryrefslogtreecommitdiff
path: root/js/dojo-1.6/dojox/rpc/SMDLibrary
diff options
context:
space:
mode:
Diffstat (limited to 'js/dojo-1.6/dojox/rpc/SMDLibrary')
-rw-r--r--js/dojo-1.6/dojox/rpc/SMDLibrary/dojo-api.smd30
-rw-r--r--js/dojo-1.6/dojox/rpc/SMDLibrary/friendfeed.smd49
-rw-r--r--js/dojo-1.6/dojox/rpc/SMDLibrary/geonames.smd263
-rw-r--r--js/dojo-1.6/dojox/rpc/SMDLibrary/google.smd129
-rw-r--r--js/dojo-1.6/dojox/rpc/SMDLibrary/twitter.smd35
-rw-r--r--js/dojo-1.6/dojox/rpc/SMDLibrary/wikipedia.smd49
-rw-r--r--js/dojo-1.6/dojox/rpc/SMDLibrary/yahoo.smd519
7 files changed, 1074 insertions, 0 deletions
diff --git a/js/dojo-1.6/dojox/rpc/SMDLibrary/dojo-api.smd b/js/dojo-1.6/dojox/rpc/SMDLibrary/dojo-api.smd
new file mode 100644
index 0000000..1b2db85
--- /dev/null
+++ b/js/dojo-1.6/dojox/rpc/SMDLibrary/dojo-api.smd
@@ -0,0 +1,30 @@
+{
+ envelope: "URL",
+ transport: "JSONP",
+ callbackParamName: "callback",
+ services: {
+ get: {
+ target: "http://api.dojotoolkit.org/jsdoc/jsonp",
+ parameters: [
+ { name: "name", type: "string", optional: false },
+ { name: "exact", type: "boolean", optional: true },
+ { name: "recursion", type: "boolean", optional: true },
+ { name: "resource", type: "string", optional: true },
+ { name: "project", type: "string", optional: true },
+ { name: "version", type: "string", optional: true },
+ { name: "attributes", type: "array", optional: true }
+ ]
+ },
+ batch: {
+ target: "http://api.dojotoolkit.org/jsdoc/jsonp/batch",
+ parameters: [
+ { name: "names", type: "array", optional: false },
+ { name: "exact", type: "boolean", optional: true },
+ { name: "recursion", type: "boolean", optional: true },
+ { name: "project", type: "string", optional: true },
+ { name: "version", type: "string", optional: true },
+ { name: "attributes", type: "array", optional: false }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/js/dojo-1.6/dojox/rpc/SMDLibrary/friendfeed.smd b/js/dojo-1.6/dojox/rpc/SMDLibrary/friendfeed.smd
new file mode 100644
index 0000000..a18aa8e
--- /dev/null
+++ b/js/dojo-1.6/dojox/rpc/SMDLibrary/friendfeed.smd
@@ -0,0 +1,49 @@
+{
+ "SMDVersion": "2.0",
+ "id": "http://friendfeed.com/api",
+ "description": "Friendfeed's API - documentation at http://code.google.com/p/friendfeed-api/wiki/ApiDocumentation",
+
+ transport: "JSONP",
+ envelope: "URL",
+
+ additionalParameters: true,
+ parameters: [
+ { name: "format", optional: false, "default": "json" },
+ { name: "service", optional: true },
+ { name: "start", optional: true, type: "integer" },
+ { name: "num", optional: true, type: "integer" }
+ ],
+
+ services: {
+ users: {
+ target: "http://friendfeed.com/api/feed/user",
+ parameters: [
+ { name: "nickname", type: "string", optional: false, "default": "" }
+ ]
+ },
+ entry: {
+ target: "http://friendfeed.com/api/feed/entry",
+ parameters: [
+ { name: "entry_id", type: "string", optional: false, "default": "" }
+ ]
+ },
+ search: {
+ target: "http://friendfeed.com/api/feed/search",
+ parameters: [
+ { name: "q", type: "string", optional: false, "default": "" }
+ ]
+ },
+ url: {
+ target: "http://friendfeed.com/api/feed/url",
+ parameters: [
+ { name: "url", type: "string", optional: false, "default": "" }
+ ]
+ },
+ domain: {
+ target: "http://friendfeed.com/api/feed/domain",
+ parameters: [
+ { name: "domain", type: "string", optional: false, "default":"" }
+ ]
+ }
+ }
+}
diff --git a/js/dojo-1.6/dojox/rpc/SMDLibrary/geonames.smd b/js/dojo-1.6/dojox/rpc/SMDLibrary/geonames.smd
new file mode 100644
index 0000000..04f04db
--- /dev/null
+++ b/js/dojo-1.6/dojox/rpc/SMDLibrary/geonames.smd
@@ -0,0 +1,263 @@
+{
+
+ // JSON REST services provided by geonames.org
+ // adapted from: http://www.geonames.org/export/JSON-webservices.html
+ // http://creativecommons.org/licenses/by/3.0/
+ // INCOMPLETE IMPLEMENTATION
+
+ "SMDVersion":"2.0",
+ "id":"/geonames",
+ "transport":"JSONP",
+ "envelope":"URL",
+ "target": "http://ws.geonames.org/",
+
+ "parameters" : [
+ {name:"type", optional: false, "default":"JSON"}
+ ],
+
+ "services":{
+ getCountryInfo:{
+ // Result : returns info about a country such as name, population, etc.
+ // If country parameter is not specified, that information is returned for
+ // every country
+ "target": "countryInfoJSON",
+ "parameters": [
+ { name: "country", type:"STRING", optional: true },
+ { name: "lang", type:"STRING"}, // default: "en"
+ { name: "maxRows", type:"INTEGER", optional: true } // default: 10
+ ]
+ },
+
+ getCities:{
+ // Result : returns a list of cities and placenames in the bounding box,
+ // ordered by relevancy (capital/population). Placenames close together
+ // are filterered out and only the larger name is included in the resulting list.
+ "target": "citiesJSON",
+ "parameters": [
+ { name: "north", type:"FLOAT"},
+ { name: "south", type:"FLOAT"},
+ { name: "east", type:"FLOAT"},
+ { name: "west", type:"FLOAT"},
+ { name: "lang", type:"STRING"}, // default: "en"
+ { name: "maxRows", type:"INTEGER", optional: true } // deault: 10
+ ]
+ },
+
+ "getQuakes":{
+ // Result : returns a list of earthquakes, ordered by magnitude
+ "target" : "earthquakesJSON",
+ "parameters" : [
+ // bounding box coords:
+ { name: "north", type:"FLOAT" },
+ { name: "south", type:"FLOAT" },
+ { name: "east", type:"FLOAT" },
+ { name: "west", type:"FLOAT" },
+ { name: "date", type:"STRING",optional: true }, // yyyy-MM-dd
+ { name: "minMagniture", type:"INTERGER",optional: true },
+ { name: "maxRows", type:"INTEGER", optional: true } // deault: 10
+ ]
+ },
+
+ "getWeather":{
+ // Weather data is provided in the METAR (METeorological Aerodrome Report) format.
+ // Result : returns a list of weather stations with the most recent weather observation
+ "target" : "weatherJSON",
+ "parameters" : [
+ { name: "north", type:"FLOAT" },
+ { name: "south", type:"FLOAT" },
+ { name: "east", type:"FLOAT" },
+ { name: "west", type:"FLOAT" },
+ { name: "maxRows", type:"INTEGER",optional:true } // deault: 10
+ ]
+ },
+
+ "getWeatherByICAO":{
+ // Result : returns the weather station and the most recent weather observation for the ICAO code
+ "target": "weatherIcaoJSON",
+ "parameters": [
+ { name:"ICAO", type:"STRING" }
+ ]
+ },
+
+ "getWeatherByCoords":{
+ // Result : returns a weather station with the most recent weather observation
+ "target": "findNearByWeatherJSON",
+ "parameters": [
+ { name:"lat", type:"FLOAT" },
+ { name:"lng", type:"FLOAT" }
+ ]
+ },
+
+ "getChildren":{
+ // Returns the children for a given geonameId. The children are the
+ // administrative divisions within an other administrative division.
+ // Like the counties (ADM2) in a state (ADM1) or also the countries
+ // in a continent.
+ "target": "childrenJSON",
+ "parameters": [
+ { name:"geonameId", type:"INTEGER" }
+ ]
+ },
+
+ "getHierarchy":{
+ // Result : returns a list of GeoName records, ordered by hierarchy
+ // level. The top hierarchy (continent) is the first element in the list
+ "target": "hierarchyJSON",
+ "parameters": [
+ { name:"geonameId", type:"INTEGER" }
+ ]
+ },
+
+ "getNeighbours":{
+ // The neighbourhood for US cities. Data provided by Zillow under cc-by-sa license.
+ "target":"neighboursJSON",
+ "parameters": [
+ { name:"geonameId", type:"INTEGER" }
+ //{ name:"lat", type:"FLOAT" },
+ //{ name:"long", type:"FLOAT" }
+ ]
+ },
+
+ "getNeighbourhood":{
+ // returns the neighbourhood for the given latitude/longitude
+ // Example http://ws.geonames.org/neighbourhood?lat=40.78343&lng=-73.96625
+ "target":"neighbourhoodJSON",
+ "parameters":[
+ { name:"lat", type:"FLOAT" },
+ { name:"lng", type:"FLOAT" },
+ { name:"radius", type:"FLOAT" }
+ ]
+ },
+
+ "getSiblings":{
+ // Result : returns a list of GeoNames records that have the same
+ // administrative level and the same father
+ "target":"siblingsJSON",
+ "parameters": [
+ { name:"geonameId", type:"INTEGER" }
+ ]
+ },
+
+ "getCountryCode":{
+ // returns the iso country code for the given latitude/longitude
+ // With the parameter type=xml this service returns an xml document
+ // with iso country code and country name. The optional parameter
+ // lang can be used to specify the language the country name should
+ // be in. JSON output is produced with type=JSON
+ "target":"countryCode",
+ "parameters": [
+ { name:"lat", type:"FLOAT" },
+ { name:"lng", type:"FLOAT" },
+ { name:"lang", type:"STRING",optional:true },
+ { name:"radius", type:"FLOAT" }
+ ]
+ },
+
+ "getCountrySubdivision":{
+ // returns the country and the administrative subdivison (state, province,...) for the given latitude/longitude
+ // Example http://ws.geonames.org/countrySubdivisionJSON?lat=47.03&lng=10.2
+ "target":"countrySubdivisionJSON",
+ "parameters":[
+ { name:"lat", type:"FLOAT" },
+ { name:"long", type:"FLOAT" },
+ { name:"radius", type:"FLOAT" }
+ ]
+ },
+
+ "getWikipediaBoundingBox":{
+ // returns the wikipedia entries within the bounding box as xml document
+ // Example http://ws.geonames.org/wikipediaBoundingBoxJSON?north=44.1&south=-9.9&east=-22.4&west=55.2
+ "target":"wikipediaBoundingBoxJSON",
+ "parameters":[
+ { name: "north", type:"FLOAT" },
+ { name: "south", type:"FLOAT" },
+ { name: "east", type:"FLOAT" },
+ { name: "west", type:"FLOAT" },
+ { name: "lang", type:"STRING",optional:true }, // default: "en"
+ { name: "maxRows", type:"INTEGER",optional:true } // default: 10
+ ]
+ },
+
+ "searchWikipedia":{
+ // returns the wikipedia entries found for the searchterm as xml document
+ // Example http://ws.geonames.org/wikipediaSearchJSON?q=london&maxRows=10
+ "target":"wikipediaSearchJSON",
+ "parameters":[
+ { name: "q", type:"STRING" }, // place name?
+ { name: "title", type:"STRING" }, // optional
+ { name: "lang", type:"FLOAT",optional:true }, // de or en
+ { name: "maxRows", type:"INTEGER",optional:true } // default: 10
+ ]
+ },
+
+ "getTimezone":{
+ // the timezone at the lat/lng with gmt offset (1. January) and dst offset (1. July)
+ "target":"timezoneJSON",
+ "parameters":[
+ { name:"lat", type:"FLOAT" },
+ { name:"lng", type:"FLOAT" }
+ ]
+ },
+
+ "search":{
+ // returns the names found for the searchterm as xml or json document,
+ // the search is using an AND operator
+ "target":"searchJSON",
+ "parameters":[
+ // exhaustive list. see: http://www.geonames.org/export/geonames-search.html
+ { name:"q", type:"STRING" },
+ { name:"name", type:"STRING" },
+ { name:"name_equals", type:"STRING" },
+ // optional:
+ { name:"maxRows", type:"INTEGER",optional:true }, // def: 100, max:1000
+ { name:"startRow", type:"INTEGER",optional:true }, // def: 0
+ { name:"country", type:"STRING",optional:true }, // iso-3166, def: all
+ /* name:"adminCode..." */
+ { name:"featureClass", type:"STRING",optional:true}, // ? multi, enum(a,h,l,p,r,s,t,u,v)
+ { name:"featureCode", type:"STRING",optional:true},
+ { name:"lang", type:"STRING",optional:true}, // iso-636
+ { name:"type", type:"STRING",optional:true}, // xml | json | rdf, def: xml
+ { name:"style", type:"STRING",optional:true }, // SHORT,MEDIUM,LONG,FULL def: MEDIUM
+ { name:"isNamedRequired", type:"BOOLEAN", optional:true }
+ ]
+ },
+
+ "postalCodeLookup":{
+ // returns a list of places for the given postalcode in JSON format
+ // Example http://ws.geonames.org/postalCodeLookupJSON?postalcode=6600&country=AT
+ "target":"postalCodeLookupJSON",
+ "parameters":[
+ { name:"postalcode", type:"STRING" },
+ { name:"country", type:"STRING",optional:true},
+ { name:"maxRows", type:"INTEGER", optional:true }, // def: 20
+ { name:"charset", type:"STRING",optional:true } // def: utf-8
+ ]
+ },
+
+ "postalCodeSearch":{
+ "target":"postalCodeSearchJSON",
+ "parameters":[
+ { name:"postalcode", type:"STRING",optional:true}, // one or the other
+ { name:"placename", type:"STRING",optional:true }, // one or the other
+ { name:"country", type:"STRING",optional:true},
+ { name:"style", type:"STRING",optional:true}, // def: MEDIUM
+ { name:"maxRows", type:"INTEGER",optional:true}, // def: 20
+ { name:"charset", type:"STRING",optional:true} // def: utf-8
+ ]
+ }
+
+ // TODO: implement:
+ // findNearby,
+ // findNearbyPlaceName
+ // findNearbyPostalCodes,
+ // findNearbyStreets,
+ // findNearByWeather
+ // findNearByWikipedia
+ // findNeareastAddress
+ // findNearestInterestion
+ // get
+ // gtop30
+ // srtm3
+
+ } // end services
+}
diff --git a/js/dojo-1.6/dojox/rpc/SMDLibrary/google.smd b/js/dojo-1.6/dojox/rpc/SMDLibrary/google.smd
new file mode 100644
index 0000000..82af928
--- /dev/null
+++ b/js/dojo-1.6/dojox/rpc/SMDLibrary/google.smd
@@ -0,0 +1,129 @@
+{
+ // Google Ajax API SMD as defined by:
+ // http://code.google.com/apis/ajaxsearch/documentation/reference.html
+ // PLEASE Read the Google Terms of Service:
+ // http://code.google.com/apis/ajaxsearch/terms.html
+
+ "SMDVersion": "2.0",
+ "id": "http://ajax.googleapis.com/ajax/services/search/",
+ "description": "Google Ajax API",
+
+ "transport": "JSONP",
+ "envelope": "URL",
+ "additionalParameters": true,
+
+ "parameters": [
+ // the most important param, the search query:
+ { "name": "q", optional: false, "default":"" },
+
+ // Google doesn't require, but appreciates, you using an API key
+ // see: http://code.google.com/apis/ajaxsearch/signup.html
+ // { "name": "key", optional: true, "default": "[enter your key]" },
+
+ // result size: large | small (8 or 4 per page)
+ { "name": "rsz", optional:true, "default": "small" },
+
+ // language selection:
+ { "name": "hl", optional:true, "default": "en" },
+
+ // starting offset
+ { "name": "start", optional:true, "default": 0 },
+
+ { "name": "alt", optional:false, "default": "json" },
+
+ // API version: only 1.0 supported
+ { "name": "v", optional:false, "default": "1.0" }
+ ],
+
+ "services": {
+
+ "webSearch": {
+ "target": "http://ajax.googleapis.com/ajax/services/search/web",
+ "parameters": [
+ { "name": "cx", "type":"string", "optional":true }, // unique id
+ { "name": "cref", "type":"string", "optional":true }, // linked custom search engine
+ { "name": "safe", "type":"string", "optional":true }, // active | moderate | off
+ // lr: see: http://www.google.com/coop/docs/cse/resultsxml.html#languageCollections
+ { "name": "lr", "type":"string", "optional":true } // restrict to lang
+ ]
+ },
+
+ "localSearch": {
+ "target": "http://ajax.googleapis.com/ajax/services/search/local",
+ "parameters": [
+ // comma separated lat,long value to use for center
+ { "name": "sll", "type": "string", "optional": true },
+ { "name": "sspn", "type":"string", "optional": true } // bounding box?
+ ]
+ },
+
+ "videoSearch": {
+ "target": "http://ajax.googleapis.com/ajax/services/search/video",
+ "parameters": [
+ // ordering, set "d" to order by date, "default": by relevance
+ { "name": "scoring", "type": "string", "optional": true }
+ ]
+ },
+
+ "blogSearch": {
+ "target": "http://ajax.googleapis.com/ajax/services/search/blogs",
+ "parameters": [
+ // see videoSearch params
+ { "name": "scoring", "type": "string", "optional": true }
+ ]
+ },
+
+ "newsSearch": {
+ "target": "http://ajax.googleapis.com/ajax/services/search/news",
+ "parameters": [
+ { "name": "scoring", "type": "string", "optional": true },
+ // geo: scope search to location. supply city, state, country, or zipcode
+ // using geo makes "q" param optional
+ { "name": "geo", "type":"string", optional:true }
+ ]
+ },
+
+ "bookSearch": {
+ "target": "http://ajax.googleapis.com/ajax/services/search/books",
+ "parameters": [
+ // set to "1" to only include full books
+ { "name":"as_brr", "optional": true, "type":"number" },
+ // restrict search to user-defined library
+ { "name":"as_list", "optional": true, "type":"string" }
+ ]
+ },
+
+ "imageSearch": {
+ "target": "http://ajax.googleapis.com/ajax/services/search/images",
+ "parameters": [
+ // safe: active | moderate | off
+ { "name": "safe", "type":"string", "optional":true },
+ // limit image size: one of: icon, small|medium|large|xlarge, xxlarge, huge
+ { "name": "imgsz", "type":"string", "optional": true },
+ // limit image color: one of: mono|gray|color
+ { "name": "imgc", "type":"string", "optional": true },
+ // use "face" to limit to mugshots
+ { "name": "imgtype", "type":"string", "optional": true },
+ // limit to file "type": jpg|png|gif|bmp
+ { "name": "as_filetype", "type": "string", "optional": true },
+ // limit results to domain:
+ { "name": "as_sitesearch", "type": "string", "optional": true }
+ ]
+ },
+
+ "getFeed": {
+ "target": "http://ajax.googleapis.com/ajax/services/feed/load",
+ // pass a feed URL in the q parameter
+ "parameters": []
+ },
+
+ "translate" : {
+ "target" : "http://ajax.googleapis.com/ajax/services/language/translate",
+ "parameters": [
+ // A String like "en|es" (for english -> spanish)
+ { "name":"langpair", "type":"string", optional:false }
+ ]
+ }
+
+ }
+}
diff --git a/js/dojo-1.6/dojox/rpc/SMDLibrary/twitter.smd b/js/dojo-1.6/dojox/rpc/SMDLibrary/twitter.smd
new file mode 100644
index 0000000..6c19b3a
--- /dev/null
+++ b/js/dojo-1.6/dojox/rpc/SMDLibrary/twitter.smd
@@ -0,0 +1,35 @@
+{
+
+ "SMDVersion": "2.0",
+ "id": "http://apiwiki.twitter.com/w/page/22554756/Twitter-Search-API-Method:-search",
+ "description": "Twitter Search API",
+
+ "transport": "JSONP",
+ "envelope": "URL",
+ "additionalParameters": true,
+
+ "parameters": [
+ // the most important param, the search query:
+ { "name": "q", optional: false, "default":"" },
+
+
+ // result size: large | small (8 or 4 per page)
+ { "name": "rpp", optional:true, "default": 10 },
+
+ // language selection:
+ { "name": "lang", optional:true, "default": "en" },
+
+ // starting page
+ { "name": "page", optional:true, "default": 0 }
+
+ ],
+
+ "services": {
+
+ "search": {
+ "target": "http://search.twitter.com/search.json",
+ "parameters": [
+ ]
+ }
+ }
+}
diff --git a/js/dojo-1.6/dojox/rpc/SMDLibrary/wikipedia.smd b/js/dojo-1.6/dojox/rpc/SMDLibrary/wikipedia.smd
new file mode 100644
index 0000000..d91b2c3
--- /dev/null
+++ b/js/dojo-1.6/dojox/rpc/SMDLibrary/wikipedia.smd
@@ -0,0 +1,49 @@
+{
+ "SMDVersion": "2.0",
+ "id": "http://en.wikipedia.org/w/api.php",
+ "description": "Wikipedia API",
+
+ transport: "JSONP",
+ envelope: "URL",
+ additionalParameters: true,
+ target: "http://en.wikipedia.org/w/api.php",
+ parameters: [
+ { name: "format", optional: false, "default": "json" }
+ ],
+
+ services: {
+
+ /*
+ * This is a very very basic spec that just gives us a free-form API
+ * endpoint to talk to. See http://en.wikipedia.org/w/api.php for
+ * details on what parameters to supply and what sort of data you
+ * should expect to see. Note that returned JSON is often somewhat
+ * ... interesting ...:
+ *
+ * {
+ * "parse": {
+ * "text": {
+ * "*": "<table ..."
+ * },
+ * "langlinks": [
+ * {
+ * "lang": "simple",
+ * "*": ""
+ * },
+ * // etc.
+ * ]
+ * }
+ * }
+ *
+ * Not sure why we'd ever want an element to be named "*", but that's
+ * how it is. So take care.
+ *
+ */
+ query: {
+ parameters: [
+ { name: "action", type: "string", "default": "parse" }
+ ]
+ }
+
+ }
+}
diff --git a/js/dojo-1.6/dojox/rpc/SMDLibrary/yahoo.smd b/js/dojo-1.6/dojox/rpc/SMDLibrary/yahoo.smd
new file mode 100644
index 0000000..831e0b1
--- /dev/null
+++ b/js/dojo-1.6/dojox/rpc/SMDLibrary/yahoo.smd
@@ -0,0 +1,519 @@
+{
+ "SMDVersion": "2.0",
+ // FIXME: is this the kind of value we're supposed to use here?
+ "id": "http://developer.yahoo.com/search/",
+ "description": "Yahoo's search API",
+
+ transport: "JSONP",
+ envelope: "URL",
+ additionalParameters: true,
+ parameters: [
+ { name: "appid", optional: false, "default": "dojotoolkit" },
+ { name: "output", optional: false, "default": "json" }
+ ],
+
+ // FIXME: Quite a few of these APIs can take multiple entries for the same parameter, to behave
+ // as multi-select options. How should we handle these?
+
+ // ANSWER: JSON Schema defines this aspect of SMD, enumeration of possible values is handled
+ // with an "options" attribute. For example:
+ // { name: "search_in", type: "string", optional: true, "default": "all", options:["all", "question", "best_answer"]}, // can be "all", "question", "best_answer"
+
+ services: {
+ //
+ // ANSWERS
+ //
+ // FIXME: Some of these API endpoints' names only make sense when you know they're in the
+ // Yahoo Answers part of the API; just reading a flat listing of methods in this SMD
+ // likely won't have enough information about what they do. Should we split this up?
+
+ // http://developer.yahoo.com/answers/V1/questionSearch.html
+ questionSearch: {
+ target: "http://answers.yahooapis.com/AnswersService/V1/questionSearch",
+ parameters: [
+ { name: "query", type: "string", optional: false, "default": "" },
+ { name: "search_in", type: "string", optional: true, "default": "all" }, // can be "all", "question", "best_answer"
+ { name: "category_id", type: "integer", optional: true, "default": null }, // one of (category_id, category_name) is required
+ { name: "category_name", type: "string", optional: true, "default": null },
+ { name: "region", type: "string", optional: true, "default": "us" }, // can be "us", "uk", "ca", "au", "in", "es", "br", "ar", "mx", "e1", "it", "de", "fr", "sg"
+ { name: "date_range", type: "string", optional: true, "default": "all" }, // can be "all", "7", "7-30", "30-60", "60-90", "more90"
+ { name: "sort", type: "string", optional: true, "default": "relevance" }, // can be "relevance", "date_desc", "date_asc"
+ { name: "type", type: "string", optional: true, "default": "all" }, // can be "all", "resolved", "open", "undecided"
+ { name: "start", type: "integer", optional: true, "default": 0 },
+ { name: "results", type: "integer", optional: true, "default": 10 } // max 50
+ ]
+ },
+
+ // http://developer.yahoo.com/answers/V1/getByCategory.html
+ getByCategory: {
+ target: "http://answers.yahooapis.com/AnswersService/V1/getByCategory",
+ parameters: [
+ { name: "category_id", type: "integer", optional: true, "default": null }, // one of (category_id, category_name) is required
+ { name: "category_name", type: "string", optional: true, "default": null },
+ { name: "type", type: "string", optional: true, "default": "all" }, // can be "all", "resolved", "open", "undecided"
+ { name: "region", type: "string", optional: true, "default": "us" }, // can be "us", "uk", "ca", "au", "in", "es", "br", "ar", "mx", "e1", "it", "de", "fr", "sg"
+ { name: "sort", type: "string", optional: true, "default": "date_desc" }, // can be "date_desc", "date_asc", "ans_count_desc", "ans_count_asc"
+ { name: "start", type: "integer", optional: true, "default": 0 },
+ { name: "results", type: "integer", optional: true, "default": 10 } // max 50
+ ]
+ },
+
+ // http://developer.yahoo.com/answers/V1/getQuestion.html
+ getQuestion: {
+ target: "http://answers.yahooapis.com/AnswersService/V1/getQuestion",
+ parameters: [
+ { name: "question_id", type: "string", optional: true, "default": null }
+ ]
+ },
+
+ // http://developer.yahoo.com/answers/V1/getByUser.html
+ getByUser: {
+ target: "http://answers.yahooapis.com/AnswersService/V1/getByUser",
+ parameters: [
+ { name: "user_id", type: "string", optional: false, "default": "" },
+ { name: "type", type: "string", optional: true, "default": "all" }, // can be "all", "resolved", "open", "undecided"
+ { name: "filter", type: "string", optional: true, "default": "question" }, // can be "question", "answer", "best_answer"
+ { name: "sort", type: "string", optional: true, "default": "date_desc" }, // can be "date_desc", "date_asc", "ans_count_desc", "ans_count_asc"
+ { name: "start", type: "integer", optional: true, "default": 0 },
+ { name: "results", type: "integer", optional: true, "default": 10 } // max 50
+ ]
+ },
+
+ //
+ // AUDIO SEARCH
+ //
+
+ // http://developer.yahoo.com/search/audio/V1/artistSearch.html
+ artistSearch: {
+ target: "http://search.yahooapis.com/AudioSearchService/V1/artistSearch",
+ parameters: [
+ { name: "artist", type: "string", optional: true, "default": "" }, // one of (artist, artistid) is required
+ { name: "artistid", type: "string", optional: true, "default": "" },
+ { name: "type", type: "string", optional: true, "default": "all" }, // can be "all", "any", "phrase"
+ { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+ { name: "start", type: "integer", optional: true, "default": 1 }
+ ]
+ },
+
+ // http://developer.yahoo.com/search/audio/V1/albumSearch.html
+ albumSearch: {
+ target: "http://search.yahooapis.com/AudioSearchService/V1/albumSearch",
+ parameters: [
+ { name: "artist", type: "string", optional: true, "default": "" },
+ { name: "artistid", type: "string", optional: true, "default": "" },
+ { name: "album", type: "string", optional: true, "default": "" },
+ { name: "albumid", type: "string", optional: true, "default": "" },
+ { name: "type", type: "string", optional: true, "default": "all" }, // can be "all", "any", "phrase"
+ { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+ { name: "start", type: "integer", optional: true, "default": 1 }
+ ]
+ },
+
+ // http://developer.yahoo.com/search/audio/V1/songSearch.html
+ songSearch: {
+ // beware, this method has returned many a JSON string containing syntax error(s)
+ target: "http://search.yahooapis.com/AudioSearchService/V1/songSearch",
+ parameters: [
+ { name: "artist", type: "string", optional: true, "default": "" },
+ { name: "artistid", type: "string", optional: true, "default": "" },
+ { name: "album", type: "string", optional: true, "default": "" },
+ { name: "albumid", type: "string", optional: true, "default": "" },
+ { name: "song", type: "string", optional: true, "default": "" },
+ { name: "songid", type: "string", optional: true, "default": "" },
+ { name: "type", type: "string", optional: true, "default": "all" }, // can be "all", "any", "phrase"
+ { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+ { name: "start", type: "integer", optional: true, "default": 1 }
+ ]
+ },
+
+ // http://developer.yahoo.com/search/audio/V1/songDownloadLocation.html
+ songDownloadLocation: {
+ target: "http://search.yahooapis.com/AudioSearchService/V1/songDownloadLocation",
+ parameters: [
+ { name: "songid", type: "string", optional: false, "default": "" },
+ { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+ { name: "start", type: "integer", optional: true, "default": 1 },
+ { name: "source", type: "string", optional: true, "default": "" } // can be "audiolunchbox", "artistdirect", "buymusic", "dmusic", "emusic", "epitonic", "garageband", "itunes", "yahoo", "livedownloads", "mp34u", "msn", "musicmatch", "mapster", "passalong", "rhapsody", "soundclick", "theweb"
+ ]
+ },
+
+ //
+ // CONTENT ANALYSIS
+ //
+
+ // http://developer.yahoo.com/search/content/V1/termExtraction.html
+ termExtraction: {
+ // FIXME: the API docs say to submit this as a POST, but we need JSONP for cross-domain, right?
+ // transport: "POST",
+ target: "http://search.yahooapis.com/ContentAnalysisService/V1/termExtraction",
+ parameters: [
+ { name: "context", type: "string", optional: false, "default": "" },
+ { name: "query", type: "string", optional: true, "default": "" }
+ ]
+ },
+
+ //
+ // CONTEXT SEARCH
+ //
+
+ // http://developer.yahoo.com/search/content/V1/contextSearch.html
+ contextSearch: {
+ target: "http://search.yahooapis.com/WebSearchService/V1/contextSearch",
+ parameters: [
+ { name: "query", type: "string", optional: true, "default": "" },
+ { name: "context", type: "string", optional: false, "default": "" },
+ { name: "results", type: "integer", optional: true, "default": 10 }, // max 100
+ { name: "start", type: "integer", optional: true, "default": 1 },
+ { name: "format", type: "string", optional: true, "default": "any" }, // can be "any", "html", "msword", "pdf", "ppt", "rss", "txt", "xls"
+ { name: "adult_ok", type: "boolean", optional: true, "default": null },
+ { name: "similar_ok", type: "boolean", optional: true, "default": null },
+ { name: "language", type: "string", optional: true, "default": null },
+ { name: "country", type: "string", optional: true, "default": null },
+ { name: "site", type: "string", optional: true, "default": null },
+ { name: "license", type: "string", optional: true, "default": "any" } // can be "any", "cc_any", "cc_commercial", "cc_modifiable"
+ ]
+ },
+
+ //
+ // IMAGE SEARCH
+ //
+
+ // http://developer.yahoo.com/search/image/V1/imageSearch.html
+ imageSearch: {
+ target: "http://search.yahooapis.com/ImageSearchService/V1/imageSearch",
+ parameters: [
+ { name: "query", type: "string", optional: false, "default": "" },
+ { name: "type", type: "string", optional: true, "default": "any" }, // can be "all", "any", "phrase"
+ { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+ { name: "start", type: "integer", optional: true, "default": 1 },
+ { name: "format", type: "string", optional: true, "default": "any" }, // can be "any", "bmp", "gif", "jpeg", "png"
+ { name: "adult_ok", type: "boolean", optional: true, "default": null },
+ { name: "coloration", type: "string", optional: true, "default": "any" }, // can be "any", "color", "bw"
+ { name: "site", type: "string", optional: true, "default": null }
+ ]
+ },
+
+ //
+ // LOCAL SEARCH
+ //
+
+ // http://developer.yahoo.com/search/local/V3/localSearch.html
+ localSearch: {
+ target: "http://local.yahooapis.com/LocalSearchService/V3/localSearch",
+ parameters: [
+ { name: "query", type: "string", optional: true, "default": "" }, // optional, but one of (query, listing_id) is required
+ { name: "listing_id", type: "string", optional: true, "default": "" },
+ { name: "results", type: "integer", optional: true, "default": 10 }, // max 20
+ { name: "start", type: "integer", optional: true, "default": 1 },
+ { name: "sort", type: "string", optional: true, "default": "relevance" }, // can be "relevance", "title", "distance", "rating"
+ { name: "radius", type: "float", optional: true }, // the default varies according to location
+ { name: "street", type: "string", optional: true, "default": null },
+ { name: "city", type: "string", optional: true, "default": null },
+ { name: "state", type: "string", optional: true, "default": null }, // full name or two-letter abbreviation
+ { name: "zip", type: "any", optional: true, "default": null }, // ddddd or ddddd-dddd format
+ { name: "location", type: "string", optional: true, "default": null }, // free text, supersedes the street, city, state, zip fields
+ { name: "latitude", type: "float", optional: true }, // -90 to 90
+ { name: "longitude", type: "float", optional: true }, // -180 to 180
+ { name: "category", type: "integer", optional: true },
+ { name: "omit_category", type: "integer", optional: true },
+ { name: "minimum_rating", type: "integer", optional: true }
+ ]
+ },
+
+ // http://developer.yahoo.com/local/V1/collectionSearch.html
+ collectionSearch: {
+ target: "http://collections.local.yahooapis.com/LocalSearchService/V1/collectionSearch",
+ parameters: [
+ { name: "query", type: "string", optional: true, "default": "" }, // optional, but at least one of (query, username) is required
+ { name: "username", type: "string", optional: true, "default": "" },
+ { name: "city", type: "string", optional: true, "default": null },
+ { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+ { name: "start", type: "integer", optional: true, "default": 1 }
+ ]
+ },
+
+ // http://developer.yahoo.com/local/V1/getCollection.html
+ getCollection: {
+ target: "http://collections.local.yahooapis.com/LocalSearchService/V1/getCollection",
+ parameters: [
+ { name: "collection_id", type: "integer", optional: false, "default": "" }
+ ]
+ },
+
+ //
+ // MY WEB 2.0
+ //
+
+ // http://developer.yahoo.com/search/myweb/V1/urlSearch.html
+ urlSearch: {
+ target: "http://search.yahooapis.com/MyWebService/V1/urlSearch",
+ parameters: [
+ { name: "tag", type: "string", optional: true, "default": "" },
+ { name: "yahooid", type: "string", optional: true, "default": "" },
+ { name: "sort", type: "string", optional: true, "default": "date" }, // can be "date", "title", "url"
+ { name: "reverse_sort", type: "boolean", optional: true, "default": 0 },
+ { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+ { name: "start", type: "integer", optional: true, "default": 1 }
+ ]
+ },
+
+ // http://developer.yahoo.com/search/myweb/V1/tagSearch.html
+ tagSearch: {
+ target: "http://search.yahooapis.com/MyWebService/V1/tagSearch",
+ parameters: [
+ { name: "url", type: "string", optional: true, "default": "" },
+ { name: "yahooid", type: "string", optional: true, "default": "" },
+ { name: "sort", type: "string", optional: true, "default": "popularity" }, // can be "popularity", "tag", "date"
+ { name: "reverse_sort", type: "boolean", optional: true, "default": 0 },
+ { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+ { name: "start", type: "integer", optional: true, "default": 1 }
+ ]
+ },
+
+ // http://developer.yahoo.com/search/myweb/V1/relatedTags.html
+ relatedTags: {
+ target: "http://search.yahooapis.com/MyWebService/V1/relatedTags",
+ parameters: [
+ { name: "tag", type: "string", optional: false, "default": "" },
+ { name: "yahooid", type: "string", optional: true, "default": "" },
+ { name: "sort", type: "string", optional: true, "default": "popularity" }, // can be "popularity", "tag", "date"
+ { name: "reverse_sort", type: "boolean", optional: true, "default": 0 },
+ { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+ { name: "start", type: "integer", optional: true, "default": 1 }
+ ]
+ },
+
+ //
+ // NEWS SEARCH
+ //
+
+ // http://developer.yahoo.com/search/news/V1/newsSearch.html
+ newsSearch: {
+ target: "http://search.yahooapis.com/NewsSearchService/V1/newsSearch",
+ parameters: [
+ { name: "query", type: "string", optional: false, "default": "" },
+ { name: "type", type: "string", optional: true, "default": "any" }, // can be "all", "any", "phrase"
+ { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+ { name: "start", type: "integer", optional: true, "default": 1 },
+ { name: "sort", type: "string", optional: true, "default": "rank" }, // can be "rank", "date"
+ { name: "language", type: "string", optional: true, "default": null },
+ { name: "site", type: "string", optional: true, "default": null }
+ ]
+ },
+
+ //
+ // SHOPPING
+ //
+
+ // http://developer.yahoo.com/shopping/V2/catalogListing.html
+ catalogListing: {
+ target: "http://shopping.yahooapis.com/ShoppingService/V2/catalogListing",
+ parameters: [
+ { name: "catalogid", type: "integer", optional: true, "default": null }, // required if idtype,idvalue are not specified
+ { name: "getlisting", type: "boolean", optional: true, "default": 1 },
+ { name: "getreview", type: "boolean", optional: true, "default": 0 },
+ { name: "getspec", type: "boolean", optional: true, "default": 0 },
+ { name: "idtype", type: "string", optional: true, "default": null }, // can be "upc", "brand,model", "brand,partnum"; required if catalogid is not specified
+ { name: "idvalue", type: "string", optional: true, "default": null }, // required if catalogid is not specified
+ { name: "onlynew", type: "boolean", optional: true, "default": 1 },
+ { name: "reviewstart", type: "integer", optional: true, "default": 1 },
+ { name: "reviewsort", type: "string", optional: true, "default": "mostRecommended_descending" }, // can be "mostRecommended_descending", "mostRecommended_ascending", "latest_descending", "latest_ascending", "highestRated_descending", "highestRated_ascending"
+ { name: "zip", type: "string", optional: true, "default": null }
+ ]
+ },
+
+
+ // http://developer.yahoo.com/shopping/V1/merchantSearch.html
+ merchantSearch: {
+ target: "http://api.shopping.yahoo.com/ShoppingService/V1/merchantSearch",
+ parameters: [
+ { name: "merchantid", type: "integer", optional: false, "default": null }
+ ]
+ },
+
+
+ // http://developer.yahoo.com/shopping/V3/productSearch.html
+ productSearch: {
+ target: "http://shopping.yahooapis.com/ShoppingService/V3/productSearch",
+ parameters: [
+ { name: "query", type: "string", optional: true, "default": "" }, // required if category is not specified
+ { name: "category", type: "any", optional: true, "default": "" }, // required if query is not specified
+ { name: "class", type: "string", optional: true, "default": null }, // can be "catalogs", "freeoffers", "paidoffers"; defaults to all three of these
+ { name: "department", type: "integer", optional: true, "default": null },
+ { name: "highestprice", type: "float", optional: true, "default": null },
+ { name: "lowestprice", type: "float", optional: true, "default": null },
+ { name: "merchantId", type: "integer", optional: true, "default": null },
+ { name: "refinement", type: "string", optional: true, "default": null }, // used only if category is specified
+ { name: "results", type: "integer", optional: true, "default": 10 }, // 1-50
+ { name: "show_numratings", type: "boolean", optional: true, "default": 0 },
+ { name: "show_narrowing", type: "boolean", optional: true, "default": 1 },
+ { name: "sort", type: "string", optional: true }, // can be "price_ascending", "price_descending", "userrating_ascending", "userrating_descending"; omitted, the default is to sort by relevance
+ { name: "start", type: "integer", optional: true, "default": 1 } // 1-300
+ ]
+ },
+
+ //
+ // SITE EXPLORER
+ //
+
+ // http://developer.yahoo.com/search/siteexplorer/V1/inlinkData.html
+ inlinkData: {
+ target: "http://search.yahooapis.com/SiteExplorerService/V1/inlinkData",
+ parameters: [
+ { name: "query", type: "string", optional: false, "default": "" },
+ { name: "results", type: "integer", optional: true, "default": 50 }, // max 100
+ { name: "start", type: "integer", optional: true, "default": 1 },
+ { name: "entire_site", type: "boolean", optional: true, "default": null },
+ { name: "omit_inlinks", type: "string", optional: true, "default": "none" } // can be "none", "domain", "subdomain"
+ ]
+ },
+
+ // http://developer.yahoo.com/search/siteexplorer/V1/pageData.html
+ pageData: {
+ target: "http://search.yahooapis.com/SiteExplorerService/V1/pageData",
+ parameters: [
+ { name: "query", type: "string", optional: false, "default": "" },
+ { name: "results", type: "integer", optional: true, "default": 50 }, // max 100
+ { name: "start", type: "integer", optional: true, "default": 1 },
+ { name: "domain_only", type: "boolean", optional: true, "default": null }
+ ]
+ },
+
+ // http://developer.yahoo.com/search/siteexplorer/V1/ping.html
+ ping: {
+ target: "http://search.yahooapis.com/SiteExplorerService/V1/ping",
+ parameters: [
+ { name: "sitemap", type: "string", optional: false, "default": "" }
+ ]
+ },
+
+ // http://developer.yahoo.com/search/siteexplorer/V1/updateNotification.html
+ updateNotification: {
+ target: "http://search.yahooapis.com/SiteExplorerService/V1/updateNotification",
+ parameters: [
+ { name: "url", type: "string", optional: false, "default": "" }
+ ]
+ },
+
+ //
+ // TRAFFIC
+ //
+
+ // http://developer.yahoo.com/traffic/rest/V1/index.html
+ trafficData: {
+ target: "http://local.yahooapis.com/MapsService/V1/trafficData",
+ parameters: [
+ { name: "street", type: "string", optional: true, "default": "" },
+ { name: "city", type: "string", optional: true, "default": "" },
+ { name: "state", type: "string", optional: true, "default": null }, // full name or two-letter abbreviation
+ { name: "zip", type: "any", optional: true, "default": null }, // ddddd or ddddd-dddd format
+ { name: "location", type: "string", optional: true, "default": null }, // free text, supersedes the street, city, state, zip fields
+ { name: "latitude", type: "float", optional: true }, // -90 to 90
+ { name: "longitude", type: "float", optional: true }, // -180 to 180
+ { name: "severity", type: "integer", optional: true, "default": 1 }, // can be 1-5
+ { name: "zoom", type: "integer", optional: true, "default": 6 }, // can be 1-12
+ { name: "radius", type: "float", optional: true }, // in miles, default varies with location; ignored if zoom is specified
+ { name: "include_map", type: "boolean", optional: true, "default": 0 },
+ { name: "image_type", type: "string", optional: true, "default": "png" }, // can be "png" or "gif"
+ { name: "image_height", type: "integer", optional: true, "default": 500 }, // in pixels, can be 10-2000
+ { name: "image_width", type: "integer", optional: true, "default": 620 } // in pixels, can be 10-2000
+ ]
+ },
+
+ //
+ // TRAVEL
+ //
+
+ // http://developer.yahoo.com/travel/tripservice/V1.1/tripSearch.html
+ tripSearch: {
+ target: "http://travel.yahooapis.com/TripService/V1.1/tripSearch",
+ parameters: [
+ { name: "query", type: "string", optional: true, "default": "" },
+ { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+ { name: "start", type: "integer", optional: true, "default": 1 }
+ ]
+ },
+
+ // http://developer.yahoo.com/travel/tripservice/V1.1/getTrip.html
+ getTrip: {
+ target: "http://travel.yahooapis.com/TripService/V1.1/getTrip",
+ parameters: [
+ { name: "id", type: "integer", optional: false, "default": null }
+ ]
+ },
+
+ //
+ // UTILITY SERVICES
+ //
+
+ // http://developer.yahoo.com/util/timeservice/V1/getTime.html
+ /* RGG: commented out because it refuses to return JSON format even when you tell it
+ to do so (it returns a <script> tag)
+ getTime: {
+ target: "http://developer.yahooapis.com/TimeService/V1/getTime",
+ parameters: [
+ { name: "format", type: "string", optional: true, "default": "unix" } // can be "unix" for unix timestamp, "ms" for milliseconds
+ ]
+ },
+ */
+
+ //
+ // VIDEO SEARCH
+ //
+
+ // http://developer.yahoo.com/search/video/V1/videoSearch.html
+ videoSearch: {
+ target: "http://search.yahooapis.com/VideoSearchService/V1/videoSearch",
+ parameters: [
+ { name: "query", type: "string", optional: false, "default": "" },
+ { name: "type", type: "string", optional: true, "default": "any" }, // can be "all", "any", "phrase"
+ { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
+ { name: "start", type: "integer", optional: true, "default": 1 },
+ { name: "format", type: "string", optional: true, "default": "any" }, // can be "any", "avi", "flash", "mpeg", "msmedia", "quicktime", "realmedia"
+ { name: "adult_ok", type: "boolean", optional: true, "default": null },
+ { name: "site", type: "string", optional: true, "default": null }
+ ]
+ },
+
+ //
+ // WEB SEARCH
+ //
+
+ // http://developer.yahoo.com/search/web/V1/webSearch.html
+ webSearch: {
+ target: "http://search.yahooapis.com/WebSearchService/V1/webSearch",
+ parameters: [
+ { name: "query", type: "string", optional: false, "default": "" }, // must be less than 1kb
+ { name: "region", type: "string", optional: true, "default": "us" },
+ { name: "type", type: "string", optional: true, "default": "any" }, // can be "all", "any", "phrase"
+ { name: "results", type: "integer", optional: true, "default": 10 }, // max 100
+ { name: "start", type: "integer", optional: true, "default": 1 },
+ { name: "format", type: "string", optional: true, "default": "any" }, // can be "any", "html", "msword", "pdf", "ppt", "rss", "txt", "xls"
+ { name: "adult_ok", type: "boolean", optional: true, "default": null },
+ { name: "similar_ok", type: "boolean", optional: true, "default": null },
+ { name: "language", type: "string", optional: true, "default": null },
+ { name: "country", type: "string", optional: true, "default": null },
+ { name: "site", type: "string", optional: true, "default": null },
+ { name: "subscription", type: "string", optional: true, "default": null },
+ { name: "license", type: "string", optional: true, "default": "any" } // can be "any", "cc_any", "cc_commercial", "cc_modifiable"
+ ]
+ },
+
+ // http://developer.yahoo.com/search/web/V1/spellingSuggestion.html
+ spellingSuggestion: {
+ target: "http://search.yahooapis.com/WebSearchService/V1/spellingSuggestion",
+ parameters: [
+ { name: "query", type: "string", optional: false, "default": "" }
+ ]
+ },
+
+ // http://developer.yahoo.com/search/web/V1/relatedSuggestion.html
+ relatedSuggestion: {
+ target: "http://search.yahooapis.com/WebSearchService/V1/relatedSuggestion",
+ parameters: [
+ { name: "query", type: "string", optional: false, "default": "" },
+ { name: "results", type: "integer", optional: true, "default": 10 } // max 50
+ ]
+ }
+ }
+}