This method returns the set of tags that are associated with the videos that match the submitted query.
The URL for this method accepts the following parameters:
|
appid
|
String value. Required.
The Application ID, which is a unique identifier, assigned by Truveo, for your application. To view your current Application ID or request a new one, please consult your My API Account page.
|
|
method
|
String value. Required.
The name of the method to invoke. In this case, the value of this argument should be set to 'truveo.videos.getRelatedTags'.
|
|
query
|
String value. Optional. Default value of ' '.
The query string that will be submitted to the Truveo video search engine. This string contains your search terms and can also include Boolean operators, modifiers, filters and sorters. For a complete listing of the supported functionality, see the documentation on search query syntax. If no query string or a blank query string is provided, this method will return the top videos ordered by vrank.
|
|
results
|
Integer between 1 and 50. Optional. Default value of 10.
The number of results the search engine should attempt to return in response to your request.
|
|
start
|
Integer not less than zero, not greater than 1000. Optional. Default value of 0.
The starting position of the first result, out of the entire set of matching results, that should be returned in response to your request.
|
The XML response for this method can contain the following fields:
|
<Response>
|
The top-level field for the XML response.
|
|
<method>
|
Parent tag: <Response>
A string containing the name of the API method used to retrieve the response. In this case, this field would return the string 'truveo.videos.getRelatedTags'.
|
|
<query>
|
Parent tag: <Response>
A string containing the original submitted query associated with this response.
|
|
<querySuggestion>
|
Parent tag: <Response>
A string containing a suggested query, if available, for the original submitted query associated with this response.
|
|
<TagSet>
|
Parent tag: <Response>
The container for all of the tags associated with the entire set of matching videos. The TagSet is returned only if the parameter 'showRelatedItems' is set to 1.
|
|
<totalResultsReturned>
|
Parent tag: <TagSet>
An integer representing the total number of tags returned in this TagSet.
|
|
<firstResultPosition>
|
Parent tag: <TagSet>
An integer representing the position of the first Tag in the set of returned tags.
|
|
<Tag>
|
Parent tag: <TagSet>
The container for the name and count values of a single tag.
|
|
<name>
|
Parent tag: <Tag>
A string containing the name of the tag.
|
|
<count>
|
Parent tag: <Tag>
An integer representing the total number of times this tag has been assigned to any of the videos in the result set.
|
A sample REST-style request for this method can be constructed as follows:
http://xml.truveo.com/apiv3
?appid=[myAppId]
&method=truveo.videos.getRelatedTags
&query=Jennifer+Lopez
&results=5
&start=0
Example XML Response
A sample XML response for this method is listed in the text field below.
Errors
If execution of this method is not successful, the following error codes can be returned:
|
1
|
Invalid request: 'appid'
An application ID was not submitted with the request.
|
|
2
|
Invalid request: 'method'
A method was not submitted with the request.
|
|
5
|
Invalid request: 'query'
The query parameter was not submitted with the request.
|
|
3
|
Invalid request: 'start'
The start parameter must be a non-negative integer.
|
|
4
|
Invalid request: 'results'
The results parameter must be an integer between 1 and 50.
|
|
7
|
Invalid request: 'showAdult'
The showAdult parameter must be 0 or 1.
|
|
12
|
Service Unavailable
Truveo Video Search API service unavailable.
|
|
13
|
Method not found.
The method you submitted with the request was not valid.
|
|
14
|
Access Denied: invalid appid.
The application ID submitted with the request is invalid.
|
|
15
|
Access Denied: appid over limit.
The application ID submitted with the request is over the daily request limit.
|