2012-12-19 38 views

回答

1

在YQL中,「desc」命令給出了該表的簡要總結(ref:YQL docs)。在你的榜樣,請求desc answers.getquestion顯示有關該表中的一些簡單的信息:

<table hash="2143dbc888c9ccf3daac6778d0f57a32" 
    name="answers.getquestion" security="ANY"> 
    <meta> 
     <author>James Broad</author> 
     <documentationURL>http://developer.yahoo.com/answers/V1/getQuestion.html</documentationURL> 
     <sampleQuery>select * from answers.getquestion where question_id="20090526102023AAkRbch"</sampleQuery> 
    </meta> 
    <request> 
     <select> 
      <key name="appid" private="true" type="xs:string"/> 
      <key name="question_id" required="true" type="xs:string"/> 
     </select> 
    </request> 
</table> 

您關於響應領域的問題,他們將通過從雅虎直接上門答案Get Question API call。 YQL表只是底層API的一個包裝,因此結果將簡單地通過YQL流回。

例如,你可以看到在YQL控制檯從select * from answers.getquestion where question_id="1005120800412"結果:

<Question xmlns="urn:yahoo:answers" id="1005120800412" type="Answered"> 
    <Subject>Why is there no TITLE tag in the header of answers.yahoo.com?</Subject> 
    <Content>Come on, you guys. It's not valid HTML if there's no title. :) Correction: there's no TITLE tag in any of the edit screens, including the one I'm using to add these details. Sorry, my bad.</Content> 
    <Date>2005-12-08 08:22:33</Date> 
    <Timestamp>1134058953</Timestamp> 
    etc. 
</Question> 
+0

聽起來像是得到我想要的數據是依賴於YQL表的詳細程度。這使得我的目的有點不可靠,除非我製作自己的YQL表來顯示更好的表格細節。感謝Brian。 –

相關問題