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.Linkstructure 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-
Noneand non-empty. relation_type must beNoneor non-empty.
- get_content_type()¶
-
Gets the
GData.Link:content-typeproperty. If the content type is non-None, it will be non-empty.New in version 0.4.0.
- get_language()¶
-
Gets the
GData.Link:languageproperty. 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:lengthproperty.New in version 0.4.0.
- get_relation_type()¶
-
Gets the
GData.Link:relation-typeproperty. If the relation type is non-None, it will be non-empty.New in version 0.4.0.
- get_title()¶
-
Gets the
GData.Link:titleproperty.New in version 0.4.0.
- get_uri()¶
- Returns:
the link’s URI
- Return type:
Gets the
GData.Link:uriproperty. The return value is guaranteed to be a valid IRI, as specified by the Atom protocol. Common relationship values such asalternateare 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-typeproperty to content_type. content_type must beNoneor non-empty.Set content_type to
Noneto unset the property in the link.New in version 0.4.0.
- set_language(language)¶
-
Sets the
GData.Link:languageproperty to language. language must beNoneor non-empty.Set language to
Noneto 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:lengthproperty 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-typeproperty 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_EDITorGData.LINK_SELF.Set relation_type to
Noneto unset the property in the link.New in version 0.4.0.
- set_title(title)¶
-
Sets the
GData.Link:titleproperty to title.Set title to
Noneto 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:uriproperty to uri. uri must be non-Noneand 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:uriproperty 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:uriproperty.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.