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.YouTubeQuery
structure 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.YouTubeQuery
with itsGData.Query
:q
property set to q.New in version 0.3.0.
- get_age()¶
- Returns:
the age property
- Return type:
Gets the
GData.YouTubeQuery
:age
property.New in version 0.3.0.
- get_format()¶
- Returns:
the format property
- Return type:
Gets the
GData.YouTubeQuery
:format
property.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
:language
property.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
:license
property.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
True
if the query is searching for videos with a specific location,False
otherwise, 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-radius
andGData.YouTubeQuery
:has-location
.New in version 0.3.0.
- get_order_by()¶
-
Gets the
GData.YouTubeQuery
:order-by
property.New in version 0.3.0.
- get_restriction()¶
-
Gets the
GData.YouTubeQuery
:restriction
property.New in version 0.3.0.
- get_safe_search()¶
- Returns:
the safe search property
- Return type:
Gets the
GData.YouTubeQuery
:safe-search
property.New in version 0.3.0.
- get_sort_order()¶
- Returns:
the sort order property
- Return type:
Gets the
GData.YouTubeQuery
:sort-order
property.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
:uploader
property.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
:age
property of theGData.YouTubeQuery
to age.New in version 0.3.0.
- set_format(format)¶
- Parameters:
format (
GData.YouTubeFormat
) – the requested video format
Sets the
GData.YouTubeQuery
:format
property of theGData.YouTubeQuery
to 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
:language
property of theGData.YouTubeQuery
to the new language, language.Set language to
None
to 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
:license
property of theGData.YouTubeQuery
to the new license value, license.Set license to
None
to 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_MAXDOUBLE
longitude (
float
) – the new longitude, orGObject.G_MAXDOUBLE
radius (
float
) – the new location radius, or 0has_location (
bool
) –True
if the query is for videos with a specific location,False
otherwise
Sets the location-based properties of the
GData.YouTubeQuery
:GData.YouTubeQuery
:latitude
,GData.YouTubeQuery
:longitude
,GData.YouTubeQuery
:location-radius
andGData.YouTubeQuery
:has-location
.New in version 0.3.0.
- set_order_by(order_by)¶
-
Sets the
GData.YouTubeQuery
:order-by
property of theGData.YouTubeQuery
to the new order by string, order_by.Set order_by to
None
to unset the property in the query URI.New in version 0.3.0.
- set_restriction(restriction)¶
-
Sets the
GData.YouTubeQuery
:restriction
property of theGData.YouTubeQuery
to the new restriction string, restriction.Set restriction to
None
to 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-search
property of theGData.YouTubeQuery
to 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-order
property of theGData.YouTubeQuery
to sort_order.Set sort_order to
GData.YouTubeSortOrder.NONE
to 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
:uploader
property of theGData.YouTubeQuery
to 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.UNKNOWN
to 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
:latitude
andGData.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-Hans
for simplified Chinese andzh-Hant
for 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-radius
is 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-location
is 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 toNone
to 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
:latitude
andGData.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
,viewCount
andrating
.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.