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