]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
5494d7f0f259fdd001cdbb587d54817813fafa92
[tmp/jakarta-migration.git] /
1 <?xml version="1.0"?>
2 <!--
3 The contents of this file are subject to the terms
4 of the Common Development and Distribution License
5 (the "License").  You may not use this file except
6 in compliance with the License.
7
8 You can obtain a copy of the license at
9 http://www.opensource.org/licenses/cddl1.php
10 See the License for the specific language governing
11 permissions and limitations under the License.
12 -->
13 <application xmlns:xsd="http://www.w3.org/2001/XMLSchema"
14              xmlns:yn="urn:yahoo:yn"
15              xmlns:ya="urn:yahoo:api"
16              xmlns:html="http://www.w3.org/1999/xhtml"
17              xmlns="http://wadl.dev.java.net/2009/02">
18
19   <grammars>
20     <include href="NewsSearchResponse.xsd"/>
21     <include href="NewsSearchError.xsd"/>
22   </grammars>
23   
24   <resources base="http://api.search.yahoo.com/NewsSearchService/V1/">
25     <resource path="newsSearch">
26       <doc xml:lang="en" title="Yahoo News Search Service">
27         The <html:i>Yahoo News Search</html:i> service provides online searching of news
28         stories from around the world.
29       </doc>
30       <param name="appid" type="xsd:string" required="true" style="query">
31         <doc>The application ID. See <html:a href="http://developer.yahoo.com/faq/index.html#appid">Application IDs</html:a> for more information.</doc>
32       </param>
33       <method href="#search"/>
34     </resource>
35   </resources>
36   
37   <method name="GET" id="search">
38     <doc xml:lang="en" title="Search news stories by keyword"/>
39     <request>
40       <param name="query" type="xsd:string" required="true" style="query">
41         <doc xml:lang="en" title="Space separated keywords to search for"/>
42       </param>
43       <param name="type" type="xsd:string" default="all" style="query">
44         <doc xml:lang="en" title="Keyword matching"/>
45         <option value="all">
46           <doc>All query terms.</doc>
47         </option>
48         <option value="any">
49           <doc>Any query terms.</doc>
50         </option>
51         <option value="phrase">
52           <doc>Query terms as a phrase.</doc>
53         </option>
54       </param>
55       <param name="results" type="xsd:int" default="10" style="query">
56         <doc xml:lang="en" title="Number of results"/>
57       </param>
58       <param name="start" type="xsd:int" default="1" style="query">
59         <doc xml:lang="en" title="Index of first result"/>
60       </param>
61       <param name="sort" type="xsd:string" default="rank" style="query">
62         <doc xml:lang="en" title="Sort by date or rank"/>
63         <option value="rank"/>
64         <option value="date"/>
65       </param>
66       <param name="language" type="xsd:string" style="query">
67         <doc xml:lang="en" title="Language filter, omit for any language"/>
68       </param>
69       <param name="output" type="xsd:string" default="xml" style="query">
70         <doc>The format for the output. If <html:em>json</html:em> is requested, the results will be returned in <html:a href="http://developer.yahoo.com/common/json.html">JSON</html:a> format. If <html:em>php</html:em> is requested, the results will be returned in <html:a href="http://developer.yahoo.com/common/phpserial.html">Serialized PHP</html:a> format.</doc>
71         <option value="xml"/>
72         <option value="json"/>
73         <option value="php"/>
74       </param>
75       <param name="callback" type="xsd:string" style="query">
76         <doc>The name of the callback function to wrap around the JSON data. The following characters are allowed: A-Z a-z 0-9 . [] and _. If output=json has not been requested, this parameter has no effect. More information on the callback can be found in the <html:a href="http://developer.yahoo.com/common/json.html#callbackparam">Yahoo! Developer Network JSON Documentation</html:a>.</doc>
77       </param>
78     </request>
79     <response status="200">
80       <representation mediaType="application/xml" element="yn:ResultSet">
81         <doc xml:lang="en" title="A list of news items matching the query"/>
82       </representation>
83     </response>
84     <response status="400">
85       <representation id="SearchError" mediaType="application/xml"
86              element="ya:Error"/>
87     </response>
88   </method>
89   
90 </application>