GData.Link¶
- Subclasses:
None
Methods¶
- Inherited:
GData.Parsable (5), GObject.Object (37), GData.Comparable (1)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
GData.Parsable (9), GObject.Object (7), GData.Comparable (1)
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
An advisory media type. |
||
r/w |
Describes the language of the resource pointed to by the uri property. |
||
r/w |
Indicates an advisory length of the linked content in octets. |
||
r/w |
The link relation type. |
||
r/w |
Conveys human-readable information about the link. |
||
r/w |
The link’s IRI. |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class GData.Link(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
All the fields in the
GData.Link
structure are private and should never be accessed directly.- classmethod new(uri, relation_type)¶
- Parameters:
- Returns:
a new
GData.Link
, orNone
; unref withGObject.Object.unref
()- Return type:
Creates a new
GData.Link
. More information is available in the Atom specification.uri must be non-
None
and non-empty. relation_type must beNone
or non-empty.
- get_content_type()¶
-
Gets the
GData.Link
:content-type
property. If the content type is non-None
, it will be non-empty.New in version 0.4.0.
- get_language()¶
-
Gets the
GData.Link
:language
property. If the language is non-None
, it will be non-empty.New in version 0.4.0.
- get_length()¶
- Returns:
the link’s length, or -1
- Return type:
Gets the
GData.Link
:length
property.New in version 0.4.0.
- get_relation_type()¶
-
Gets the
GData.Link
:relation-type
property. If the relation type is non-None
, it will be non-empty.New in version 0.4.0.
- get_title()¶
-
Gets the
GData.Link
:title
property.New in version 0.4.0.
- get_uri()¶
- Returns:
the link’s URI
- Return type:
Gets the
GData.Link
:uri
property. The return value is guaranteed to be a valid IRI, as specified by the Atom protocol. Common relationship values such asalternate
are returned ashttp://www.iana.org/assignments/relation/alternate
.For more information, see the Atom specification.
New in version 0.4.0.
- set_content_type(content_type)¶
-
Sets the
GData.Link
:content-type
property to content_type. content_type must beNone
or non-empty.Set content_type to
None
to unset the property in the link.New in version 0.4.0.
- set_language(language)¶
-
Sets the
GData.Link
:language
property to language. language must beNone
or non-empty.Set language to
None
to unset the property in the link.New in version 0.4.0.
- set_length(length)¶
- Parameters:
length (
int
) – the new length for the link, or -1
Sets the
GData.Link
:length
property to length.Set length to -1 to unset the property in the link.
New in version 0.4.0.
- set_relation_type(relation_type)¶
-
Sets the
GData.Link
:relation-type
property to relation_type. If relation_type is one of the standard Atom relation types, use one of the defined relation type values, instead of a static string. e.g.GData.LINK_EDIT
orGData.LINK_SELF
.Set relation_type to
None
to unset the property in the link.New in version 0.4.0.
- set_title(title)¶
-
Sets the
GData.Link
:title
property to title.Set title to
None
to unset the property in the link.New in version 0.4.0.
- set_uri(uri)¶
- Parameters:
uri (
str
) – the new URI for the link
Sets the
GData.Link
:uri
property to uri. uri must be non-None
and non-empty.New in version 0.4.0.
Property Details¶
- GData.Link.props.content_type¶
-
An advisory media type: it is a hint about the type of the representation that is expected to be returned when the value of the
GData.Link
:uri
property is dereferenced.For more information, see the
New in version 0.4.0.
- GData.Link.props.language¶
-
Describes the language of the resource pointed to by the
GData.Link
:uri
property.For more information, see the
New in version 0.4.0.
- GData.Link.props.length¶
-
Indicates an advisory length of the linked content in octets. -1 means the length is unspecified.
For more information, see the
New in version 0.4.0.
- GData.Link.props.relation_type¶
- Name:
relation-type
- Type:
- Default Value:
'http://www.iana.org/assignments/relation/alternate'
- Flags:
The link relation type.
For more information, see the
New in version 0.4.0.
- GData.Link.props.title¶
-
Conveys human-readable information about the link.
For more information, see the
New in version 0.4.0.