📄 yahoo.smd
字号:
{ "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? 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 contextSearch: { // 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": "" } ] }, // // 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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -