In the DayPI, quotes are things people have
said (not stock quotes!). When the Daylife system can determine who said
the quote, the quote is assigned an attribution. The quote API method calls
return articles, quotes, images and topics for a given quote.
quote_getInfo
This function returns basic information for
a quote.
Sample Invocation
Input Parameters
| accesskey |
|
string |
Y |
<your_access_key> |
N/A |
| signature |
|
string |
Y |
<calculated_signature> |
N/A |
| quote_id |
The quote id |
string |
Y |
0ak0fu91Rr3km |
N/A |
Sample Output
<response>
<message type="str">Success</message>
<code type="int4">2001</code>
<payload>
<quote>
<quote_id type="str">03TWezQa1M85p</quote_id>
<timestamp_epoch type="int4">1200749352</timestamp_epoch>
<timestamp type="str">2008-01-19 13:29:12</timestamp>
<quote_text type="str">But we will still be friends with the
Americans and invite them to tea every
time they drive through the town
</quote_text>
<source>
<name type="str">MSNBC</name>
<url type="str">http://www.msnbc.msn.com/</url>
<daylife_url type="str">http://www.daylife.com/source/MSNBC</daylife_url>
<rank type="int4">1</rank>
<source_id type="str">07yTb3kbhD6Bo</source_id>
<type type="int4">1</type>
</source>
<query_term type="str">07vgers9mJayf</query_term>
<daylife_url type="str">http://www.daylife.com/quote/03TWezQa1M85p</daylife_url>
<article>
<timestamp_epoch type="int4">1200749352</timestamp_epoch>
<headline type="str">'Awakening' pacts prove complicated</headline>
<timestamp type="str">2008-01-19 13:29:12</timestamp>
<url type="str">http://www.msnbc.msn.com/id/22739412/</url>
<daylife_url type="str">http://www.daylife.com/article/0baOdqcflg2hB</daylife_url>
<article_id type="str">0baOdqcflg2hB</article_id>
</article>
</quote>
........
........
</payload>
</response>
quote_getRelatedTopics
This method is used to retrieve topics
from articles that are related to the article containing the given quote.
Sample Invocation
Input Parameters
| Name |
Description |
Type |
Required |
Sample Values |
Default Value |
| accesskey |
|
string |
Y |
<your_access_key> |
N/A |
| signature |
|
string |
Y |
<calculated_signature> |
N/A |
| quote_id |
The quote id |
string |
Y |
03cV5zI2fk03s |
N/A |
| end_time |
|
Timestamp |
N |
2007-03 |
<current time> |
| start_time |
|
Timestamp |
N |
2007-05-03 09:00:00, 1178182800 |
<end_time minus 1 month> |
| limit |
The number of results to be returned |
integer |
N |
40 |
10 |
| offset |
|
integer |
N |
5 |
0 |
| sort |
Flag to indicate the sorting order To
be implemented in future. |
string |
N |
date, relevance |
date |
| source_filter_id |
daylife source filter id |
string |
N |
06T8a8lavf8sc |
None |
| include_topic_type |
one
or more name value pairs indicating which sorts of topics you
wish to include |
string |
N |
PERSON, ORGANIZATION, PLACE, EVENT,
HOLIDAY, ISSUE, SPORT, STATION, PRODUCT, DRUG, DISEASE |
All types of topics |
| include_image |
Flag that indicates if a thumbnail
image for each topic should be returned if available. |
integer |
N |
0 or 1 |
0 |
Sample Output:
<response>
<message type="str">Success</message>
<code type="int4">2001</code>
<payload>
<topic>
<topic_id type="str">0dVm3LAbhJbES</topic_id>
<type type="str">PLACE</type>
<name type="str">United States</name>
<daylife_url type="str">http://www.daylife.com/topic/United_States</daylife_url>
<image>
<url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/45x45.jpg</url>
<daylife_url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/340x.jpg</daylife_url>
<thumb_url type="str">http://cache.daylife.com/imageserve/0gwb63H2Wmapg/45x45.jpg</thumb_url>
<timestamp_epoch type="int4">1177281949</timestamp_epoch>
<timestamp type="str">2007-04-22 22:45:49</timestamp>
<credit type="str">AFP/Getty Images</credit>
<image_topic_relevance type="int4">10</image_topic_relevance>
<width type="int4">2860</width>
<height type="int4">2268</height>
<image_id type="str">0gwb63H2Wmapg</image_id>
<caption type="str">
Vania King of the US (L) speaks with US team captain Zena Garrison (R)
during a break in her match against Kirsten Flipken of Belgium in the
quarter-finals round in the Fed Cup World Group 2007 between Belgium and
the US in Delray Beach, Florida 22 April 2007. King won the match 4-6,
6-4, 7-5 to give the US a total score of 3-0 and move to the next round
</caption>
<source>
<name type="str">Getty Images</name>
<url type="str">http://gettyimages.com/</url>
<daylife_url type="str">http://www.daylife.com/source/Getty_Images</daylife_url>
<rank type="int4">1</rank>
<source_id type="str">0a9L9fsaU55wK</source_id>
<type type="int4">6</type>
</source>
</image>
</topic>
........
........
</payload>
</response>