Struct google_youtube3::SearchListCall [] [src]

pub struct SearchListCall<'a, C, A> where
    C: 'a,
    A: 'a, 
{ /* fields omitted */ }

Returns a collection of search results that match the query parameters specified in the API request. By default, a search result set identifies matching video, channel, and playlist resources, but you can also configure queries to only retrieve a specific type of resource.

A builder for the list method supported by a search resource. It is not used directly, but through a SearchMethods instance.

Example

Instantiate a resource method builder

 
// You can configure optional parameters by calling the respective setters at will, and
// execute the final call using `doit()`.
// Values shown here are possibly random and not representative !
let result = hub.search().list("part")
             .video_type("amet.")
             .video_syndicated("dolores")
             .video_license("dolores")
             .video_embeddable("et")
             .video_duration("sed")
             .video_dimension("et")
             .video_definition("aliquyam")
             .video_category_id("nonumy")
             .video_caption("sit")
             .type_("aliquyam")
             .topic_id("sadipscing")
             .safe_search("magna")
             .relevance_language("gubergren")
             .related_to_video_id("sit")
             .region_code("gubergren")
             .q("sit")
             .published_before("amet")
             .published_after("eirmod")
             .page_token("sanctus")
             .order("Lorem")
             .on_behalf_of_content_owner("amet.")
             .max_results(60)
             .location_radius("eirmod")
             .location("sadipscing")
             .for_mine(true)
             .for_developer(false)
             .for_content_owner(true)
             .event_type("dolore")
             .channel_type("et")
             .channel_id("At")
             .doit();

Methods

impl<'a, C, A> SearchListCall<'a, C, A> where
    C: BorrowMut<Client>,
    A: GetToken
[src]

Perform the operation you have build so far.

The part parameter specifies a comma-separated list of one or more search resource properties that the API response will include. Set the parameter value to snippet.

Sets the part query property to the given value.

Even though the property as already been set when instantiating this call, we provide this method for API completeness.

The videoType parameter lets you restrict a search to a particular type of videos. If you specify a value for this parameter, you must also set the type parameter's value to video.

Sets the video type query property to the given value.

The videoSyndicated parameter lets you to restrict a search to only videos that can be played outside youtube.com. If you specify a value for this parameter, you must also set the type parameter's value to video.

Sets the video syndicated query property to the given value.

The videoLicense parameter filters search results to only include videos with a particular license. YouTube lets video uploaders choose to attach either the Creative Commons license or the standard YouTube license to each of their videos. If you specify a value for this parameter, you must also set the type parameter's value to video.

Sets the video license query property to the given value.

The videoEmbeddable parameter lets you to restrict a search to only videos that can be embedded into a webpage. If you specify a value for this parameter, you must also set the type parameter's value to video.

Sets the video embeddable query property to the given value.

The videoDuration parameter filters video search results based on their duration. If you specify a value for this parameter, you must also set the type parameter's value to video.

Sets the video duration query property to the given value.

The videoDimension parameter lets you restrict a search to only retrieve 2D or 3D videos. If you specify a value for this parameter, you must also set the type parameter's value to video.

Sets the video dimension query property to the given value.

The videoDefinition parameter lets you restrict a search to only include either high definition (HD) or standard definition (SD) videos. HD videos are available for playback in at least 720p, though higher resolutions, like 1080p, might also be available. If you specify a value for this parameter, you must also set the type parameter's value to video.

Sets the video definition query property to the given value.

The videoCategoryId parameter filters video search results based on their category. If you specify a value for this parameter, you must also set the type parameter's value to video.

Sets the video category id query property to the given value.

The videoCaption parameter indicates whether the API should filter video search results based on whether they have captions. If you specify a value for this parameter, you must also set the type parameter's value to video.

Sets the video caption query property to the given value.

The type parameter restricts a search query to only retrieve a particular type of resource. The value is a comma-separated list of resource types.

Sets the type query property to the given value.

The topicId parameter indicates that the API response should only contain resources associated with the specified topic. The value identifies a Freebase topic ID.

Sets the topic id query property to the given value.

The safeSearch parameter indicates whether the search results should include restricted content as well as standard content.

Sets the safe search query property to the given value.

The relevanceLanguage parameter instructs the API to return search results that are most relevant to the specified language. The parameter value is typically an ISO 639-1 two-letter language code. However, you should use the values zh-Hans for simplified Chinese and zh-Hant for traditional Chinese. Please note that results in other languages will still be returned if they are highly relevant to the search query term.

Sets the relevance language query property to the given value.

The relatedToVideoId parameter retrieves a list of videos that are related to the video that the parameter value identifies. The parameter value must be set to a YouTube video ID and, if you are using this parameter, the type parameter must be set to video.

Sets the related to video id query property to the given value.

The regionCode parameter instructs the API to return search results for the specified country. The parameter value is an ISO 3166-1 alpha-2 country code.

Sets the region code query property to the given value.

The q parameter specifies the query term to search for.

Your request can also use the Boolean NOT (-) and OR (|) operators to exclude videos or to find videos that are associated with one of several search terms. For example, to search for videos matching either "boating" or "sailing", set the q parameter value to boating|sailing. Similarly, to search for videos matching either "boating" or "sailing" but not "fishing", set the q parameter value to boating|sailing -fishing. Note that the pipe character must be URL-escaped when it is sent in your API request. The URL-escaped value for the pipe character is %7C.

Sets the q query property to the given value.

The publishedBefore parameter indicates that the API response should only contain resources created before the specified time. The value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z).

Sets the published before query property to the given value.

The publishedAfter parameter indicates that the API response should only contain resources created after the specified time. The value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z).

Sets the published after query property to the given value.

The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.

Sets the page token query property to the given value.

The order parameter specifies the method that will be used to order resources in the API response.

Sets the order query property to the given value.

Note: This parameter is intended exclusively for YouTube content partners.

The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.

Sets the on behalf of content owner query property to the given value.

The maxResults parameter specifies the maximum number of items that should be returned in the result set.

Sets the max results query property to the given value.

The locationRadius parameter, in conjunction with the location parameter, defines a circular geographic area.

The parameter value must be a floating point number followed by a measurement unit. Valid measurement units are m, km, ft, and mi. For example, valid parameter values include 1500m, 5km, 10000ft, and 0.75mi. The API does not support locationRadius parameter values larger than 1000 kilometers.

Note: See the definition of the location parameter for more information.

Sets the location radius query property to the given value.

The location parameter, in conjunction with the locationRadius parameter, defines a circular geographic area and also restricts a search to videos that specify, in their metadata, a geographic location that falls within that area. The parameter value is a string that specifies latitude/longitude coordinates e.g. (37.42307,-122.08427).

  • The location parameter value identifies the point at the center of the area.
  • The locationRadius parameter specifies the maximum distance that the location associated with a video can be from that point for the video to still be included in the search results.The API returns an error if your request specifies a value for the location parameter but does not also specify a value for the locationRadius parameter.

Sets the location query property to the given value.

The forMine parameter restricts the search to only retrieve videos owned by the authenticated user. If you set this parameter to true, then the type parameter's value must also be set to video.

Sets the for mine query property to the given value.

The forDeveloper parameter restricts the search to only retrieve videos uploaded via the developer's application or website. The API server uses the request's authorization credentials to identify the developer. Therefore, a developer can restrict results to videos uploaded through the developer's own app or website but not to videos uploaded through other apps or sites.

Sets the for developer query property to the given value.

Note: This parameter is intended exclusively for YouTube content partners.

The forContentOwner parameter restricts the search to only retrieve resources owned by the content owner specified by the onBehalfOfContentOwner parameter. The user must be authenticated using a CMS account linked to the specified content owner and onBehalfOfContentOwner must be provided.

Sets the for content owner query property to the given value.

The eventType parameter restricts a search to broadcast events. If you specify a value for this parameter, you must also set the type parameter's value to video.

Sets the event type query property to the given value.

The channelType parameter lets you restrict a search to a particular type of channel.

Sets the channel type query property to the given value.

The channelId parameter indicates that the API response should only contain resources created by the channel

Sets the channel id query property to the given value.

The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong while executing the actual API request.

It should be used to handle progress information, and to implement a certain level of resilience.

Sets the delegate property to the given value.

Set any additional parameter of the query string used in the request. It should be used to set parameters which are not yet available through their own setters.

Please note that this method must not be used to set any of the known paramters which have their own setter method. If done anyway, the request will fail.

Additional Parameters

  • quotaUser (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
  • oauth_token (query-string) - OAuth 2.0 token for the current user.
  • key (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  • prettyPrint (query-boolean) - Returns response with indentations and line breaks.
  • userIp (query-string) - IP address of the site where the request originates. Use this if you want to enforce per-user limits.
  • fields (query-string) - Selector specifying which fields to include in a partial response.
  • alt (query-string) - Data format for the response.

Identifies the authorization scope for the method you are building.

Use this method to actively specify which scope should be used, instead the default Scope variant Scope::Readonly.

The scope will be added to a set of scopes. This is important as one can maintain access tokens for more than one scope.

Usually there is more than one suitable scope to authorize an operation, some of which may encompass more rights than others. For example, for listing resources, a read-only scope will be sufficient, a read-write scope will do as well.

Trait Implementations

impl<'a, C, A> CallBuilder for SearchListCall<'a, C, A>
[src]