Though the vocabulary used in search responses is consistent across formats, the specific syntax differs. The following sections describe those specifics based upon the value of the format request parameter.
|
||||
Search Response Formats
Each format description includes all possible fields; see the [#Search Response Vocabulary|field descriptions] for details about when fields are included or omitted, as well as what each field means.
JSONPcom_oneriot_search_results(
{
"version": "1.1",
"query": "[query]",
"type": "[type]",
"order": "[order]",
"time": [seconds since epoch],
"maxAge": [seconds],
"totalResults": [estimated total number of results available],
"pageNumber": [page number],
"pageSize": [page size],
"featuredResultList":
[
{
"type": "[result type]",
"displayUrl": "[URL to display to user]",
"redirectUrl": "[URL that must be used for navigation]",
"source": "[human friendly site name]",
"trackingUrl": "[URL that must be used to signify that a result has been presented to a user]",
"title": "[title]",
"snippet": "[snippet]",
"thumbnail":
{
"url": "[thumbnail image URL]",
"width": [thumbnail width in pixels],
"height": [thumbnail height in pixels]
},
"firstShare":
{
"user":
{
"service": "[service identifier]",
"id": "[user identifier]",
"image":
{
"url": "[user image URL]",
"width": [user image width in pixels],
"height": [user image height in pixels]
}
},
"time": [seconds since epoch],
"comment": "[comment]"
},
"sharesList":
[
{
"service": "[service identifier]",
"total": [number of times this result shared on this service]
},
.
.
.
]
},
.
.
.
],
"resultList":
[
{
"type": "[result type]",
"displayUrl": "[URL to display to user]",
"redirectUrl": "[URL that must be used for navigation]",
"source": "[human friendly site name]",
"trackingUrl": "[URL that must be used to signify that a result has been presented to a user]",
"title": "[title]",
"snippet": "[snippet]",
"thumbnail":
{
"url": "[thumbnail image URL]",
"width": [thumbnail width in pixels],
"height": [thumbnail height in pixels]
},
"firstShare":
{
"user":
{
"service": "[service identifier]",
"id": "[user identifier]",
"image":
{
"url": "[user image URL]",
"width": [user image width in pixels],
"height": [user image height in pixels]
}
},
"time": [seconds since epoch],
"comment": "[comment]"
},
"sharesList":
[
{
"service": "[service identifier]",
"total": [number of times this result shared on this service]
},
.
.
.
]
},
.
.
.
]
}
)
XML<?xml version="1.0" encoding="UTF-8"?>
<search-results xmlns="http://xmlns.oneriot.com/api/1.0/">
<version>1.1</version>
<query>[query]</query>
<type>[type]</type>
<order>[order]</order>
<time>[seconds since epoch]</time>
<max-age>[seconds]</max-age>
<total-results>[estimated total number of results available]</total-results>
<page-number>[page number]</page-number>
<page-size>[page size]</page-size>
<featured-result-list>
<featured-result>
<type>[result type]</type>
<display-url>[URL to display to user]</display-url>
<redirect-url>[URL that must be used for navigation]</redirect-url>
<source>[human friendly site name]</source>
<tracking-url>URL that must be used to signify that a result has been presented to a user</tracking-url>
<title>[title]</title>
<snippet>[snippet]</snippet>
<thumbnail>
<url>[thumbnail image URL]</url>
<width>[thumbnail width in pixels]</width>
<height>[thumbnail height in pixels]</height>
</thumbnail>
<media-duration>[media duration in seconds]</media-duration>
<first-share>
<user>
<service>[service identifier]</service>
<id>[user identifier]</id>
<image>
<url>[user image URL]</url>
<width>[user image width in pixels]</width>
<height>[user image height in pixels]</height>
</image>
</user>
<time>[seconds since epoch]</time>
<comment>[comment]</comment>
</first-share>
<shares-list>
<shares>
<service>[service identifier]</service>
<total>[number of times this result shared on this service]</total>
</shares>
.
.
.
</shares-list>
</featured-result>
.
.
.
</featured-result-list>
<result-list>
<result>
<type>[result type]</type>
<display-url>[URL to display to user]</display-url>
<redirect-url>[URL that must be used for navigation]</redirect-url>
<source>[human friendly site name]</source>
<tracking-url>URL that must be used to signify that a result has been presented to a user</tracking-url>
<title>[title]</title>
<snippet>[snippet]</snippet>
<thumbnail>
<url>[thumbnail image URL]</url>
<width>[thumbnail width in pixels]</width>
<height>[thumbnail height in pixels]</height>
</thumbnail>
<media-duration>[media duration in seconds]</media-duration>
<first-share>
<user>
<service>[service identifier]</service>
<id>[user identifier]</id>
<image>
<url>[user image URL]</url>
<width>[user image width in pixels]</width>
<height>[user image height in pixels]</height>
</image>
</user>
<time>[seconds since epoch]</time>
<comment>[comment]</comment>
</first-share>
<shares-list>
<shares>
<service>[service identifier]</service>
<total>[number of times this result shared on this service]</total>
</shares>
.
.
.
</shares-list>
</result>
.
.
.
</result-list>
</search-results>
|
||||
|
Copyright © 2010 OneRiot Developer Network - All Rights Reserved |
||||