GData.YouTubeQuery¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w |
Restricts the search to videos uploaded within the specified time period. |
||
d/r/w |
Specifies that videos must be available in a particular video format. |
||
d/r/w |
Whether to restrict results to videos with specific coordinates. |
||
d/r/w |
Restricts the search to videos described in the given language. |
||
r/w |
The latitude of a particular location of which videos should be found. |
||
r/w |
The content license which should be used to filter search results. |
||
r/w |
The radius, in metres, of a circle to search within. |
||
r/w |
The longitude of a particular location of which videos should be found. |
||
r/w |
Specifies the order of entries in a feed. |
||
r/w |
The country code to filter videos playable only in specific countries. |
||
r/w |
Whether the search results should include restricted content. |
||
d/r/w |
Specifies the direction of sorting. |
||
d/r/w |
Restricts the search to videos from the specified type of uploader. |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
Class Details¶
- class GData.YouTubeQuery(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
All the fields in the
GData.YouTubeQuerystructure are private and should never be accessed directly.New in version 0.3.0.
- classmethod new(q)¶
- Parameters:
- Returns:
a new
GData.YouTubeQuery- Return type:
Creates a new
GData.YouTubeQuerywith itsGData.Query:qproperty set to q.New in version 0.3.0.
- get_age()¶
- Returns:
the age property
- Return type:
Gets the
GData.YouTubeQuery:ageproperty.New in version 0.3.0.
- get_format()¶
- Returns:
the format property
- Return type:
Gets the
GData.YouTubeQuery:formatproperty.New in version 0.3.0.
Deprecated since version 0.17.0: No longer supported by Google. The value of this property will be unused in queries. There is no replacement.
- get_language()¶
-
Gets the
GData.YouTubeQuery:languageproperty.New in version 0.3.0.
Deprecated since version 0.17.0: No longer supported by Google. The value of this property will be unused in queries. There is no replacement.
- get_license()¶
-
Gets the
GData.YouTubeQuery:licenseproperty.New in version 0.11.0.
- get_location()¶
- Returns:
- latitude:
a location in which to return the latitude, or
None- longitude:
a location in which to return the longitude, or
None- radius:
a location in which to return the location radius, or
None- has_location:
a location in which to return
Trueif the query is searching for videos with a specific location,Falseotherwise, orNone
- Return type:
(latitude:
float, longitude:float, radius:float, has_location:bool)
Gets the location-based properties of the
GData.YouTubeQuery:GData.YouTubeQuery:latitude,GData.YouTubeQuery:longitude,GData.YouTubeQuery:location-radiusandGData.YouTubeQuery:has-location.New in version 0.3.0.
- get_order_by()¶
-
Gets the
GData.YouTubeQuery:order-byproperty.New in version 0.3.0.
- get_restriction()¶
-
Gets the
GData.YouTubeQuery:restrictionproperty.New in version 0.3.0.
- get_safe_search()¶
- Returns:
the safe search property
- Return type:
Gets the
GData.YouTubeQuery:safe-searchproperty.New in version 0.3.0.
- get_sort_order()¶
- Returns:
the sort order property
- Return type:
Gets the
GData.YouTubeQuery:sort-orderproperty.New in version 0.3.0.
Deprecated since version 0.17.0: No longer supported by Google. The value of this property will be unused in queries. There is no replacement.
- get_uploader()¶
- Returns:
the uploader property
- Return type:
Gets the
GData.YouTubeQuery:uploaderproperty.New in version 0.3.0.
Deprecated since version 0.17.0: No longer supported by Google. The value of this property will be unused in queries. There is no replacement.
- set_age(age)¶
- Parameters:
age (
GData.YouTubeAge) – the new age
Sets the
GData.YouTubeQuery:ageproperty of theGData.YouTubeQueryto age.New in version 0.3.0.
- set_format(format)¶
- Parameters:
format (
GData.YouTubeFormat) – the requested video format
Sets the
GData.YouTubeQuery:formatproperty of theGData.YouTubeQueryto format.New in version 0.3.0.
Deprecated since version 0.17.0: No longer supported by Google. The value of this property will be unused in queries. There is no replacement.
- set_language(language)¶
-
Sets the
GData.YouTubeQuery:languageproperty of theGData.YouTubeQueryto the new language, language.Set language to
Noneto unset the property in the query URI.New in version 0.3.0.
Deprecated since version 0.17.0: No longer supported by Google. The value of this property will be unused in queries. There is no replacement.
- set_license(license)¶
-
Sets the
GData.YouTubeQuery:licenseproperty of theGData.YouTubeQueryto the new license value, license.Set license to
Noneto unset the property in the query URI.New in version 0.11.0.
- set_location(latitude, longitude, radius, has_location)¶
- Parameters:
latitude (
float) – the new latitude, orGObject.G_MAXDOUBLElongitude (
float) – the new longitude, orGObject.G_MAXDOUBLEradius (
float) – the new location radius, or 0has_location (
bool) –Trueif the query is for videos with a specific location,Falseotherwise
Sets the location-based properties of the
GData.YouTubeQuery:GData.YouTubeQuery:latitude,GData.YouTubeQuery:longitude,GData.YouTubeQuery:location-radiusandGData.YouTubeQuery:has-location.New in version 0.3.0.
- set_order_by(order_by)¶
-
Sets the
GData.YouTubeQuery:order-byproperty of theGData.YouTubeQueryto the new order by string, order_by.Set order_by to
Noneto unset the property in the query URI.New in version 0.3.0.
- set_restriction(restriction)¶
-
Sets the
GData.YouTubeQuery:restrictionproperty of theGData.YouTubeQueryto the new restriction string, restriction.Set restriction to
Noneto unset the property in the query URI.New in version 0.3.0.
- set_safe_search(safe_search)¶
- Parameters:
safe_search (
GData.YouTubeSafeSearch) – a new safe search level
Sets the
GData.YouTubeQuery:safe-searchproperty of theGData.YouTubeQueryto safe_search.New in version 0.3.0.
- set_sort_order(sort_order)¶
- Parameters:
sort_order (
GData.YouTubeSortOrder) – the new sort order
Sets the
GData.YouTubeQuery:sort-orderproperty of theGData.YouTubeQueryto sort_order.Set sort_order to
GData.YouTubeSortOrder.NONEto unset the property in the query URI.New in version 0.3.0.
Deprecated since version 0.17.0: No longer supported by Google. The value of this property will be unused in queries. There is no replacement.
- set_uploader(uploader)¶
- Parameters:
uploader (
GData.YouTubeUploader) – the new uploader
Sets the
GData.YouTubeQuery:uploaderproperty of theGData.YouTubeQueryto uploader.New in version 0.3.0.
Deprecated since version 0.17.0: No longer supported by Google. The value of this property will be unused in queries. There is no replacement.
Property Details¶
- GData.YouTubeQuery.props.age¶
- Name:
age- Type:
- Default Value:
- Flags:
Restricts the search to videos uploaded within the specified time period. To retrieve videos irrespective of their age, set the property to
GData.YouTubeAge.ALL_TIME.New in version 0.3.0.
- GData.YouTubeQuery.props.format¶
- Name:
format- Type:
- Default Value:
- Flags:
Specifies that videos must be available in a particular video format. Use
GData.YouTubeFormat.UNKNOWNto retrieve videos irrespective of their format availability.New in version 0.3.0.
Deprecated since version 0.17.0: No longer supported by Google. The value of this property will be unused in queries. There is no replacement.
- GData.YouTubeQuery.props.has_location¶
- Name:
has-location- Type:
- Default Value:
- Flags:
Whether to restrict search results to videos with specific coordinates associated with them. If used with a given
GData.YouTubeQuery:latitudeandGData.YouTubeQuery:longitude, only videos with specific coordinates (not those with merely a descriptive address) will be returned. If used without a latitude and longitude set, only videos with specific coordinates (regardless of those coordinates) will be returned.For more information, see the documentation for
GData.YouTubeQuery:latitude.New in version 0.3.0.
Deprecated since version 0.17.0: No longer supported by Google. The value of this property will be unused in queries.
- GData.YouTubeQuery.props.language¶
- Name:
language- Type:
- Default Value:
- Flags:
Restricts the search to videos that have a title, description or keywords in a specified language. The language code should be a two-letter ISO 639-1 code; or you can use
zh-Hansfor simplified Chinese andzh-Hantfor traditional Chinese.For more information, see the online documentation.
New in version 0.3.0.
Deprecated since version 0.17.0: No longer supported by Google. The value of this property will be unused in queries. There is no replacement.
- GData.YouTubeQuery.props.latitude¶
-
The latitude of a particular location of which videos should be found. This should be used in conjunction with
GData.YouTubeQuery:longitude; if either property is outside the valid range, neither will be used. Valid latitudes are between -90 and 900 degrees; any values of this property outside that range will unset the property in the query URI.If
GData.YouTubeQuery:location-radiusis a non-0 value, this will define a circle from which videos should be found.As it is deprecated, the value of
GData.YouTubeQuery:has-locationis ignored.For more information, see the online documentation.
New in version 0.3.0.
- GData.YouTubeQuery.props.license¶
-
The content license which should be used to filter search results. If set to, for example,
GData.YOUTUBE_LICENSE_CC, only videos which are Creative Commons licensed will be returned in search results. Set this toNoneto return videos under any license.For more information, see the online documentation.
New in version 0.11.0.
- GData.YouTubeQuery.props.location_radius¶
-
The radius, in metres, of a circle from within which videos should be returned. The circle is centred on the latitude and longitude given in
GData.YouTubeQuery:latitudeandGData.YouTubeQuery:longitude.Set this property to 0 to search for specific coordinates, rather than within a given radius.
For more information, see the documentation for
GData.YouTubeQuery:latitude.New in version 0.3.0.
- GData.YouTubeQuery.props.longitude¶
-
The longitude of a particular location of which videos should be found. This should be used in conjunction with
GData.YouTubeQuery:latitude; if either property is outside the valid range, neither will be used. Valid longitudes are between -180 and 180 degrees; any values of this property outside that range will unset the property in the query URI.For more information, see the documentation for
GData.YouTubeQuery:latitude.New in version 0.3.0.
- GData.YouTubeQuery.props.order_by¶
-
Specifies the order of entries in a feed. Supported values are
relevance,published,viewCountandrating.Additionally, results most relevant to a specific language can be returned by setting the property to
relevance_lang_languageCode, where languageCode is an ISO 639-1 language code, as used inGData.YouTubeQuery:language.For more information, see the online documentation.
New in version 0.3.0.
- GData.YouTubeQuery.props.restriction¶
-
An ISO 3166 two-letter country code that should be used to filter videos playable only in specific countries.
Previously, this property could also accept the client’s IP address for country lookup. This feature is no longer supported by Google, and will result in an error from the server if used. Use a country code instead.
For more information, see the online documentation.
New in version 0.3.0.
- GData.YouTubeQuery.props.safe_search¶
- Name:
safe-search- Type:
- Default Value:
- Flags:
Whether the search results should include restricted content as well as standard content.
For more information, see the online documentation.
New in version 0.3.0.
- GData.YouTubeQuery.props.sort_order¶
- Name:
sort-order- Type:
- Default Value:
- Flags:
Specifies the direction of sorting. To use the default sort order, set the property to
GData.YouTubeSortOrder.NONE.New in version 0.3.0.
Deprecated since version 0.17.0: No longer supported by Google. The value of this property will be unused in queries. There is no replacement.
- GData.YouTubeQuery.props.uploader¶
- Name:
uploader- Type:
- Default Value:
- Flags:
Restricts the search to videos from the specified type of uploader. Currently, this can only be used to restrict searches to videos from YouTube partners.
New in version 0.3.0.
Deprecated since version 0.17.0: No longer supported by Google. The value of this property will be unused in queries. There is no replacement.