yahoo.smd 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  1. {
  2. "SMDVersion": "2.0",
  3. // FIXME: is this the kind of value we're supposed to use here?
  4. "id": "http://developer.yahoo.com/search/",
  5. "description": "Yahoo's search API",
  6. transport: "JSONP",
  7. envelope: "URL",
  8. additionalParameters: true,
  9. parameters: [
  10. { name: "appid", optional: false, "default": "dojotoolkit" },
  11. { name: "output", optional: false, "default": "json" }
  12. ],
  13. // FIXME: Quite a few of these APIs can take multiple entries for the same parameter, to behave
  14. // as multi-select options. How should we handle these?
  15. // ANSWER: JSON Schema defines this aspect of SMD, enumeration of possible values is handled
  16. // with an "options" attribute. For example:
  17. // { name: "search_in", type: "string", optional: true, "default": "all", options:["all", "question", "best_answer"]}, // can be "all", "question", "best_answer"
  18. services: {
  19. //
  20. // ANSWERS
  21. //
  22. // FIXME: Some of these API endpoints' names only make sense when you know they're in the
  23. // Yahoo Answers part of the API; just reading a flat listing of methods in this SMD
  24. // likely won't have enough information about what they do. Should we split this up?
  25. // http://developer.yahoo.com/answers/V1/questionSearch.html
  26. questionSearch: {
  27. target: "http://answers.yahooapis.com/AnswersService/V1/questionSearch",
  28. parameters: [
  29. { name: "query", type: "string", optional: false, "default": "" },
  30. { name: "search_in", type: "string", optional: true, "default": "all" }, // can be "all", "question", "best_answer"
  31. { name: "category_id", type: "integer", optional: true, "default": null }, // one of (category_id, category_name) is required
  32. { name: "category_name", type: "string", optional: true, "default": null },
  33. { name: "region", type: "string", optional: true, "default": "us" }, // can be "us", "uk", "ca", "au", "in", "es", "br", "ar", "mx", "e1", "it", "de", "fr", "sg"
  34. { name: "date_range", type: "string", optional: true, "default": "all" }, // can be "all", "7", "7-30", "30-60", "60-90", "more90"
  35. { name: "sort", type: "string", optional: true, "default": "relevance" }, // can be "relevance", "date_desc", "date_asc"
  36. { name: "type", type: "string", optional: true, "default": "all" }, // can be "all", "resolved", "open", "undecided"
  37. { name: "start", type: "integer", optional: true, "default": 0 },
  38. { name: "results", type: "integer", optional: true, "default": 10 } // max 50
  39. ]
  40. },
  41. // http://developer.yahoo.com/answers/V1/getByCategory.html
  42. getByCategory: {
  43. target: "http://answers.yahooapis.com/AnswersService/V1/getByCategory",
  44. parameters: [
  45. { name: "category_id", type: "integer", optional: true, "default": null }, // one of (category_id, category_name) is required
  46. { name: "category_name", type: "string", optional: true, "default": null },
  47. { name: "type", type: "string", optional: true, "default": "all" }, // can be "all", "resolved", "open", "undecided"
  48. { name: "region", type: "string", optional: true, "default": "us" }, // can be "us", "uk", "ca", "au", "in", "es", "br", "ar", "mx", "e1", "it", "de", "fr", "sg"
  49. { name: "sort", type: "string", optional: true, "default": "date_desc" }, // can be "date_desc", "date_asc", "ans_count_desc", "ans_count_asc"
  50. { name: "start", type: "integer", optional: true, "default": 0 },
  51. { name: "results", type: "integer", optional: true, "default": 10 } // max 50
  52. ]
  53. },
  54. // http://developer.yahoo.com/answers/V1/getQuestion.html
  55. getQuestion: {
  56. target: "http://answers.yahooapis.com/AnswersService/V1/getQuestion",
  57. parameters: [
  58. { name: "question_id", type: "string", optional: true, "default": null }
  59. ]
  60. },
  61. // http://developer.yahoo.com/answers/V1/getByUser.html
  62. getByUser: {
  63. target: "http://answers.yahooapis.com/AnswersService/V1/getByUser",
  64. parameters: [
  65. { name: "user_id", type: "string", optional: false, "default": "" },
  66. { name: "type", type: "string", optional: true, "default": "all" }, // can be "all", "resolved", "open", "undecided"
  67. { name: "filter", type: "string", optional: true, "default": "question" }, // can be "question", "answer", "best_answer"
  68. { name: "sort", type: "string", optional: true, "default": "date_desc" }, // can be "date_desc", "date_asc", "ans_count_desc", "ans_count_asc"
  69. { name: "start", type: "integer", optional: true, "default": 0 },
  70. { name: "results", type: "integer", optional: true, "default": 10 } // max 50
  71. ]
  72. },
  73. //
  74. // AUDIO SEARCH
  75. //
  76. // http://developer.yahoo.com/search/audio/V1/artistSearch.html
  77. artistSearch: {
  78. target: "http://search.yahooapis.com/AudioSearchService/V1/artistSearch",
  79. parameters: [
  80. { name: "artist", type: "string", optional: true, "default": "" }, // one of (artist, artistid) is required
  81. { name: "artistid", type: "string", optional: true, "default": "" },
  82. { name: "type", type: "string", optional: true, "default": "all" }, // can be "all", "any", "phrase"
  83. { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
  84. { name: "start", type: "integer", optional: true, "default": 1 }
  85. ]
  86. },
  87. // http://developer.yahoo.com/search/audio/V1/albumSearch.html
  88. albumSearch: {
  89. target: "http://search.yahooapis.com/AudioSearchService/V1/albumSearch",
  90. parameters: [
  91. { name: "artist", type: "string", optional: true, "default": "" },
  92. { name: "artistid", type: "string", optional: true, "default": "" },
  93. { name: "album", type: "string", optional: true, "default": "" },
  94. { name: "albumid", type: "string", optional: true, "default": "" },
  95. { name: "type", type: "string", optional: true, "default": "all" }, // can be "all", "any", "phrase"
  96. { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
  97. { name: "start", type: "integer", optional: true, "default": 1 }
  98. ]
  99. },
  100. // http://developer.yahoo.com/search/audio/V1/songSearch.html
  101. songSearch: {
  102. // beware, this method has returned many a JSON string containing syntax error(s)
  103. target: "http://search.yahooapis.com/AudioSearchService/V1/songSearch",
  104. parameters: [
  105. { name: "artist", type: "string", optional: true, "default": "" },
  106. { name: "artistid", type: "string", optional: true, "default": "" },
  107. { name: "album", type: "string", optional: true, "default": "" },
  108. { name: "albumid", type: "string", optional: true, "default": "" },
  109. { name: "song", type: "string", optional: true, "default": "" },
  110. { name: "songid", type: "string", optional: true, "default": "" },
  111. { name: "type", type: "string", optional: true, "default": "all" }, // can be "all", "any", "phrase"
  112. { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
  113. { name: "start", type: "integer", optional: true, "default": 1 }
  114. ]
  115. },
  116. // http://developer.yahoo.com/search/audio/V1/songDownloadLocation.html
  117. songDownloadLocation: {
  118. target: "http://search.yahooapis.com/AudioSearchService/V1/songDownloadLocation",
  119. parameters: [
  120. { name: "songid", type: "string", optional: false, "default": "" },
  121. { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
  122. { name: "start", type: "integer", optional: true, "default": 1 },
  123. { 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"
  124. ]
  125. },
  126. //
  127. // CONTENT ANALYSIS
  128. //
  129. // http://developer.yahoo.com/search/content/V1/termExtraction.html
  130. termExtraction: {
  131. // FIXME: the API docs say to submit this as a POST, but we need JSONP for cross-domain, right?
  132. // transport: "POST",
  133. target: "http://search.yahooapis.com/ContentAnalysisService/V1/termExtraction",
  134. parameters: [
  135. { name: "context", type: "string", optional: false, "default": "" },
  136. { name: "query", type: "string", optional: true, "default": "" }
  137. ]
  138. },
  139. //
  140. // CONTEXT SEARCH
  141. //
  142. // http://developer.yahoo.com/search/content/V1/contextSearch.html
  143. contextSearch: {
  144. target: "http://search.yahooapis.com/WebSearchService/V1/contextSearch",
  145. parameters: [
  146. { name: "query", type: "string", optional: true, "default": "" },
  147. { name: "context", type: "string", optional: false, "default": "" },
  148. { name: "results", type: "integer", optional: true, "default": 10 }, // max 100
  149. { name: "start", type: "integer", optional: true, "default": 1 },
  150. { name: "format", type: "string", optional: true, "default": "any" }, // can be "any", "html", "msword", "pdf", "ppt", "rss", "txt", "xls"
  151. { name: "adult_ok", type: "boolean", optional: true, "default": null },
  152. { name: "similar_ok", type: "boolean", optional: true, "default": null },
  153. { name: "language", type: "string", optional: true, "default": null },
  154. { name: "country", type: "string", optional: true, "default": null },
  155. { name: "site", type: "string", optional: true, "default": null },
  156. { name: "license", type: "string", optional: true, "default": "any" } // can be "any", "cc_any", "cc_commercial", "cc_modifiable"
  157. ]
  158. },
  159. //
  160. // IMAGE SEARCH
  161. //
  162. // http://developer.yahoo.com/search/image/V1/imageSearch.html
  163. imageSearch: {
  164. target: "http://search.yahooapis.com/ImageSearchService/V1/imageSearch",
  165. parameters: [
  166. { name: "query", type: "string", optional: false, "default": "" },
  167. { name: "type", type: "string", optional: true, "default": "any" }, // can be "all", "any", "phrase"
  168. { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
  169. { name: "start", type: "integer", optional: true, "default": 1 },
  170. { name: "format", type: "string", optional: true, "default": "any" }, // can be "any", "bmp", "gif", "jpeg", "png"
  171. { name: "adult_ok", type: "boolean", optional: true, "default": null },
  172. { name: "coloration", type: "string", optional: true, "default": "any" }, // can be "any", "color", "bw"
  173. { name: "site", type: "string", optional: true, "default": null }
  174. ]
  175. },
  176. //
  177. // LOCAL SEARCH
  178. //
  179. // http://developer.yahoo.com/search/local/V3/localSearch.html
  180. localSearch: {
  181. target: "http://local.yahooapis.com/LocalSearchService/V3/localSearch",
  182. parameters: [
  183. { name: "query", type: "string", optional: true, "default": "" }, // optional, but one of (query, listing_id) is required
  184. { name: "listing_id", type: "string", optional: true, "default": "" },
  185. { name: "results", type: "integer", optional: true, "default": 10 }, // max 20
  186. { name: "start", type: "integer", optional: true, "default": 1 },
  187. { name: "sort", type: "string", optional: true, "default": "relevance" }, // can be "relevance", "title", "distance", "rating"
  188. { name: "radius", type: "float", optional: true }, // the default varies according to location
  189. { name: "street", type: "string", optional: true, "default": null },
  190. { name: "city", type: "string", optional: true, "default": null },
  191. { name: "state", type: "string", optional: true, "default": null }, // full name or two-letter abbreviation
  192. { name: "zip", type: "any", optional: true, "default": null }, // ddddd or ddddd-dddd format
  193. { name: "location", type: "string", optional: true, "default": null }, // free text, supersedes the street, city, state, zip fields
  194. { name: "latitude", type: "float", optional: true }, // -90 to 90
  195. { name: "longitude", type: "float", optional: true }, // -180 to 180
  196. { name: "category", type: "integer", optional: true },
  197. { name: "omit_category", type: "integer", optional: true },
  198. { name: "minimum_rating", type: "integer", optional: true }
  199. ]
  200. },
  201. // http://developer.yahoo.com/local/V1/collectionSearch.html
  202. collectionSearch: {
  203. target: "http://collections.local.yahooapis.com/LocalSearchService/V1/collectionSearch",
  204. parameters: [
  205. { name: "query", type: "string", optional: true, "default": "" }, // optional, but at least one of (query, username) is required
  206. { name: "username", type: "string", optional: true, "default": "" },
  207. { name: "city", type: "string", optional: true, "default": null },
  208. { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
  209. { name: "start", type: "integer", optional: true, "default": 1 }
  210. ]
  211. },
  212. // http://developer.yahoo.com/local/V1/getCollection.html
  213. getCollection: {
  214. target: "http://collections.local.yahooapis.com/LocalSearchService/V1/getCollection",
  215. parameters: [
  216. { name: "collection_id", type: "integer", optional: false, "default": "" }
  217. ]
  218. },
  219. //
  220. // MY WEB 2.0
  221. //
  222. // http://developer.yahoo.com/search/myweb/V1/urlSearch.html
  223. urlSearch: {
  224. target: "http://search.yahooapis.com/MyWebService/V1/urlSearch",
  225. parameters: [
  226. { name: "tag", type: "string", optional: true, "default": "" },
  227. { name: "yahooid", type: "string", optional: true, "default": "" },
  228. { name: "sort", type: "string", optional: true, "default": "date" }, // can be "date", "title", "url"
  229. { name: "reverse_sort", type: "boolean", optional: true, "default": 0 },
  230. { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
  231. { name: "start", type: "integer", optional: true, "default": 1 }
  232. ]
  233. },
  234. // http://developer.yahoo.com/search/myweb/V1/tagSearch.html
  235. tagSearch: {
  236. target: "http://search.yahooapis.com/MyWebService/V1/tagSearch",
  237. parameters: [
  238. { name: "url", type: "string", optional: true, "default": "" },
  239. { name: "yahooid", type: "string", optional: true, "default": "" },
  240. { name: "sort", type: "string", optional: true, "default": "popularity" }, // can be "popularity", "tag", "date"
  241. { name: "reverse_sort", type: "boolean", optional: true, "default": 0 },
  242. { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
  243. { name: "start", type: "integer", optional: true, "default": 1 }
  244. ]
  245. },
  246. // http://developer.yahoo.com/search/myweb/V1/relatedTags.html
  247. relatedTags: {
  248. target: "http://search.yahooapis.com/MyWebService/V1/relatedTags",
  249. parameters: [
  250. { name: "tag", type: "string", optional: false, "default": "" },
  251. { name: "yahooid", type: "string", optional: true, "default": "" },
  252. { name: "sort", type: "string", optional: true, "default": "popularity" }, // can be "popularity", "tag", "date"
  253. { name: "reverse_sort", type: "boolean", optional: true, "default": 0 },
  254. { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
  255. { name: "start", type: "integer", optional: true, "default": 1 }
  256. ]
  257. },
  258. //
  259. // NEWS SEARCH
  260. //
  261. // http://developer.yahoo.com/search/news/V1/newsSearch.html
  262. newsSearch: {
  263. target: "http://search.yahooapis.com/NewsSearchService/V1/newsSearch",
  264. parameters: [
  265. { name: "query", type: "string", optional: false, "default": "" },
  266. { name: "type", type: "string", optional: true, "default": "any" }, // can be "all", "any", "phrase"
  267. { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
  268. { name: "start", type: "integer", optional: true, "default": 1 },
  269. { name: "sort", type: "string", optional: true, "default": "rank" }, // can be "rank", "date"
  270. { name: "language", type: "string", optional: true, "default": null },
  271. { name: "site", type: "string", optional: true, "default": null }
  272. ]
  273. },
  274. //
  275. // SHOPPING
  276. //
  277. // http://developer.yahoo.com/shopping/V2/catalogListing.html
  278. catalogListing: {
  279. target: "http://shopping.yahooapis.com/ShoppingService/V2/catalogListing",
  280. parameters: [
  281. { name: "catalogid", type: "integer", optional: true, "default": null }, // required if idtype,idvalue are not specified
  282. { name: "getlisting", type: "boolean", optional: true, "default": 1 },
  283. { name: "getreview", type: "boolean", optional: true, "default": 0 },
  284. { name: "getspec", type: "boolean", optional: true, "default": 0 },
  285. { name: "idtype", type: "string", optional: true, "default": null }, // can be "upc", "brand,model", "brand,partnum"; required if catalogid is not specified
  286. { name: "idvalue", type: "string", optional: true, "default": null }, // required if catalogid is not specified
  287. { name: "onlynew", type: "boolean", optional: true, "default": 1 },
  288. { name: "reviewstart", type: "integer", optional: true, "default": 1 },
  289. { name: "reviewsort", type: "string", optional: true, "default": "mostRecommended_descending" }, // can be "mostRecommended_descending", "mostRecommended_ascending", "latest_descending", "latest_ascending", "highestRated_descending", "highestRated_ascending"
  290. { name: "zip", type: "string", optional: true, "default": null }
  291. ]
  292. },
  293. // http://developer.yahoo.com/shopping/V1/merchantSearch.html
  294. merchantSearch: {
  295. target: "http://api.shopping.yahoo.com/ShoppingService/V1/merchantSearch",
  296. parameters: [
  297. { name: "merchantid", type: "integer", optional: false, "default": null }
  298. ]
  299. },
  300. // http://developer.yahoo.com/shopping/V3/productSearch.html
  301. productSearch: {
  302. target: "http://shopping.yahooapis.com/ShoppingService/V3/productSearch",
  303. parameters: [
  304. { name: "query", type: "string", optional: true, "default": "" }, // required if category is not specified
  305. { name: "category", type: "any", optional: true, "default": "" }, // required if query is not specified
  306. { name: "class", type: "string", optional: true, "default": null }, // can be "catalogs", "freeoffers", "paidoffers"; defaults to all three of these
  307. { name: "department", type: "integer", optional: true, "default": null },
  308. { name: "highestprice", type: "float", optional: true, "default": null },
  309. { name: "lowestprice", type: "float", optional: true, "default": null },
  310. { name: "merchantId", type: "integer", optional: true, "default": null },
  311. { name: "refinement", type: "string", optional: true, "default": null }, // used only if category is specified
  312. { name: "results", type: "integer", optional: true, "default": 10 }, // 1-50
  313. { name: "show_numratings", type: "boolean", optional: true, "default": 0 },
  314. { name: "show_narrowing", type: "boolean", optional: true, "default": 1 },
  315. { name: "sort", type: "string", optional: true }, // can be "price_ascending", "price_descending", "userrating_ascending", "userrating_descending"; omitted, the default is to sort by relevance
  316. { name: "start", type: "integer", optional: true, "default": 1 } // 1-300
  317. ]
  318. },
  319. //
  320. // SITE EXPLORER
  321. //
  322. // http://developer.yahoo.com/search/siteexplorer/V1/inlinkData.html
  323. inlinkData: {
  324. target: "http://search.yahooapis.com/SiteExplorerService/V1/inlinkData",
  325. parameters: [
  326. { name: "query", type: "string", optional: false, "default": "" },
  327. { name: "results", type: "integer", optional: true, "default": 50 }, // max 100
  328. { name: "start", type: "integer", optional: true, "default": 1 },
  329. { name: "entire_site", type: "boolean", optional: true, "default": null },
  330. { name: "omit_inlinks", type: "string", optional: true, "default": "none" } // can be "none", "domain", "subdomain"
  331. ]
  332. },
  333. // http://developer.yahoo.com/search/siteexplorer/V1/pageData.html
  334. pageData: {
  335. target: "http://search.yahooapis.com/SiteExplorerService/V1/pageData",
  336. parameters: [
  337. { name: "query", type: "string", optional: false, "default": "" },
  338. { name: "results", type: "integer", optional: true, "default": 50 }, // max 100
  339. { name: "start", type: "integer", optional: true, "default": 1 },
  340. { name: "domain_only", type: "boolean", optional: true, "default": null }
  341. ]
  342. },
  343. // http://developer.yahoo.com/search/siteexplorer/V1/ping.html
  344. ping: {
  345. target: "http://search.yahooapis.com/SiteExplorerService/V1/ping",
  346. parameters: [
  347. { name: "sitemap", type: "string", optional: false, "default": "" }
  348. ]
  349. },
  350. // http://developer.yahoo.com/search/siteexplorer/V1/updateNotification.html
  351. updateNotification: {
  352. target: "http://search.yahooapis.com/SiteExplorerService/V1/updateNotification",
  353. parameters: [
  354. { name: "url", type: "string", optional: false, "default": "" }
  355. ]
  356. },
  357. //
  358. // TRAFFIC
  359. //
  360. // http://developer.yahoo.com/traffic/rest/V1/index.html
  361. trafficData: {
  362. target: "http://local.yahooapis.com/MapsService/V1/trafficData",
  363. parameters: [
  364. { name: "street", type: "string", optional: true, "default": "" },
  365. { name: "city", type: "string", optional: true, "default": "" },
  366. { name: "state", type: "string", optional: true, "default": null }, // full name or two-letter abbreviation
  367. { name: "zip", type: "any", optional: true, "default": null }, // ddddd or ddddd-dddd format
  368. { name: "location", type: "string", optional: true, "default": null }, // free text, supersedes the street, city, state, zip fields
  369. { name: "latitude", type: "float", optional: true }, // -90 to 90
  370. { name: "longitude", type: "float", optional: true }, // -180 to 180
  371. { name: "severity", type: "integer", optional: true, "default": 1 }, // can be 1-5
  372. { name: "zoom", type: "integer", optional: true, "default": 6 }, // can be 1-12
  373. { name: "radius", type: "float", optional: true }, // in miles, default varies with location; ignored if zoom is specified
  374. { name: "include_map", type: "boolean", optional: true, "default": 0 },
  375. { name: "image_type", type: "string", optional: true, "default": "png" }, // can be "png" or "gif"
  376. { name: "image_height", type: "integer", optional: true, "default": 500 }, // in pixels, can be 10-2000
  377. { name: "image_width", type: "integer", optional: true, "default": 620 } // in pixels, can be 10-2000
  378. ]
  379. },
  380. //
  381. // TRAVEL
  382. //
  383. // http://developer.yahoo.com/travel/tripservice/V1.1/tripSearch.html
  384. tripSearch: {
  385. target: "http://travel.yahooapis.com/TripService/V1.1/tripSearch",
  386. parameters: [
  387. { name: "query", type: "string", optional: true, "default": "" },
  388. { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
  389. { name: "start", type: "integer", optional: true, "default": 1 }
  390. ]
  391. },
  392. // http://developer.yahoo.com/travel/tripservice/V1.1/getTrip.html
  393. getTrip: {
  394. target: "http://travel.yahooapis.com/TripService/V1.1/getTrip",
  395. parameters: [
  396. { name: "id", type: "integer", optional: false, "default": null }
  397. ]
  398. },
  399. //
  400. // UTILITY SERVICES
  401. //
  402. // http://developer.yahoo.com/util/timeservice/V1/getTime.html
  403. /* RGG: commented out because it refuses to return JSON format even when you tell it
  404. to do so (it returns a <script> tag)
  405. getTime: {
  406. target: "http://developer.yahooapis.com/TimeService/V1/getTime",
  407. parameters: [
  408. { name: "format", type: "string", optional: true, "default": "unix" } // can be "unix" for unix timestamp, "ms" for milliseconds
  409. ]
  410. },
  411. */
  412. //
  413. // VIDEO SEARCH
  414. //
  415. // http://developer.yahoo.com/search/video/V1/videoSearch.html
  416. videoSearch: {
  417. target: "http://search.yahooapis.com/VideoSearchService/V1/videoSearch",
  418. parameters: [
  419. { name: "query", type: "string", optional: false, "default": "" },
  420. { name: "type", type: "string", optional: true, "default": "any" }, // can be "all", "any", "phrase"
  421. { name: "results", type: "integer", optional: true, "default": 10 }, // max 50
  422. { name: "start", type: "integer", optional: true, "default": 1 },
  423. { name: "format", type: "string", optional: true, "default": "any" }, // can be "any", "avi", "flash", "mpeg", "msmedia", "quicktime", "realmedia"
  424. { name: "adult_ok", type: "boolean", optional: true, "default": null },
  425. { name: "site", type: "string", optional: true, "default": null }
  426. ]
  427. },
  428. //
  429. // WEB SEARCH
  430. //
  431. // http://developer.yahoo.com/search/web/V1/webSearch.html
  432. webSearch: {
  433. target: "http://search.yahooapis.com/WebSearchService/V1/webSearch",
  434. parameters: [
  435. { name: "query", type: "string", optional: false, "default": "" }, // must be less than 1kb
  436. { name: "region", type: "string", optional: true, "default": "us" },
  437. { name: "type", type: "string", optional: true, "default": "any" }, // can be "all", "any", "phrase"
  438. { name: "results", type: "integer", optional: true, "default": 10 }, // max 100
  439. { name: "start", type: "integer", optional: true, "default": 1 },
  440. { name: "format", type: "string", optional: true, "default": "any" }, // can be "any", "html", "msword", "pdf", "ppt", "rss", "txt", "xls"
  441. { name: "adult_ok", type: "boolean", optional: true, "default": null },
  442. { name: "similar_ok", type: "boolean", optional: true, "default": null },
  443. { name: "language", type: "string", optional: true, "default": null },
  444. { name: "country", type: "string", optional: true, "default": null },
  445. { name: "site", type: "string", optional: true, "default": null },
  446. { name: "subscription", type: "string", optional: true, "default": null },
  447. { name: "license", type: "string", optional: true, "default": "any" } // can be "any", "cc_any", "cc_commercial", "cc_modifiable"
  448. ]
  449. },
  450. // http://developer.yahoo.com/search/web/V1/spellingSuggestion.html
  451. spellingSuggestion: {
  452. target: "http://search.yahooapis.com/WebSearchService/V1/spellingSuggestion",
  453. parameters: [
  454. { name: "query", type: "string", optional: false, "default": "" }
  455. ]
  456. },
  457. // http://developer.yahoo.com/search/web/V1/relatedSuggestion.html
  458. relatedSuggestion: {
  459. target: "http://search.yahooapis.com/WebSearchService/V1/relatedSuggestion",
  460. parameters: [
  461. { name: "query", type: "string", optional: false, "default": "" },
  462. { name: "results", type: "integer", optional: true, "default": 10 } // max 50
  463. ]
  464. }
  465. }
  466. }