SearchOptions class

Inheritance

Constructors

SearchOptions({Set<SearchPart> parts = const {SearchPart.snippet}, bool? forContentOwner, bool? forDeveloper, bool? forMine, String? channelId, ChannelType? channelType, EventType? eventType, String? location, String? locationRadius, int? maxResults, String? onBehalfOfContentOwner, Order? order, String? pageToken, DateTime? publishedAfter, DateTime? publishedBefore, String? query, String? regionCode, String? relevanceLanguage, SafeSearch? safeSearch, Topic? topic, List<ResultType>? type, VideoCaption? videoCaption, Category? category, VideoDefinition? videoDefinition, VideoDimension? videoDimension, VideoDuration? videoDuration, VideoEmbeddable? videoEmbeddable, VideoLicense? videoLicense, VideoSyndicated? videoSyndicated, VideoType? videoType})
const

Properties

category Category?
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.
final
channelId String?
The channelId parameter indicates that the API response should only contain resources created by the channel.
final
channelType ChannelType?
The channelType parameter lets you restrict a search to a particular type of channel.
final
eventType EventType?
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.
final
forContentOwner bool?
This parameter can only be used in a properly authorized request, and it is intended exclusively for YouTube content partners.
final
forDeveloper bool?
This parameter can only be used in a properly authorized request. 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. The forDeveloper parameter can be used in conjunction with optional search parameters like the q parameter.
final
forMine bool?
This parameter can only be used in a properly authorized request. 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. In addition, none of the following other parameters can be set in the same request: videoDefinition, videoDimension, videoDuration, videoLicense, videoEmbeddable, videoSyndicated, videoType.
final
hashCode int
The hash code for this object.
no setterinherited
location String?
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).
final
locationRadius String?
The locationRadius parameter, in conjunction with the location parameter, defines a circular geographic area.
final
maxResults int?
The maxResults parameter specifies the maximum number of items that should be returned in the result set. Acceptable values are 0 to 50, inclusive. The default value is 5.
finalinherited
onBehalfOfContentOwner String?
This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.
finalinherited
order Order?
The order parameter specifies the method that will be used to order resources in the API response. The default value is relevance.
final
pageToken String?
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.
finalinherited
parts Set<SearchPart>
final
publishedAfter DateTime?
The publishedAfter parameter indicates that the API response should only contain resources created at or after the specified time. The value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z).
final
publishedBefore DateTime?
The publishedBefore parameter indicates that the API response should only contain resources created before or at the specified time. The value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z).
final
query String?
The q parameter specifies the query term to search for.
final
regionCode String?
The regionCode parameter instructs the API to return search results for videos that can be viewed in the specified country. The parameter value is an ISO 3166-1 alpha-2 country code.
finalinherited
relevanceLanguage String?
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.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
safeSearch SafeSearch?
The safeSearch parameter indicates whether the search results should include restricted content as well as standard content.
final
topic Topic?
The topicId parameter indicates that the API response should only contain resources associated with the specified topic. The value identifies a Freebase topic ID.
final
type List<ResultType>?
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. The default value is video,channel,playlist.
final
videoCaption VideoCaption?
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](#type) parameter's value to video.
final
videoDefinition VideoDefinition?
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.
final
videoDimension VideoDimension?
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.
final
videoDuration VideoDuration?
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.
final
videoEmbeddable VideoEmbeddable?
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.
final
videoLicense VideoLicense?
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.
final
videoSyndicated VideoSyndicated?
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.
final
videoType VideoType?
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.
final

Methods

copyWith({Set<SearchPart>? part, int? maxResults, String? onBehalfOfContentOwner, String? pageToken, String? regionCode, bool? forContentOwner, bool? forDeveloper, bool? forMine, String? channelId, ChannelType? channelType, EventType? eventType, String? location, String? locationRadius, Order? order, DateTime? publishedAfter, DateTime? publishedBefore, String? query, String? relevanceLanguage, SafeSearch? safeSearch, Topic? topic, List<ResultType>? type, VideoCaption? videoCaption, Category? category, VideoDefinition? videoDefinition, VideoDimension? videoDimension, VideoDuration? videoDuration, VideoEmbeddable? videoEmbeddable, VideoLicense? videoLicense, VideoSyndicated? videoSyndicated, VideoType? videoType}) SearchOptions
getMap(String key) Map<String, String>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited