AppStream.Release

g AppStream.Release AppStream.Release GObject.Object GObject.Object GObject.Object->AppStream.Release

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

add_artifact (artifact)

add_issue (issue)

add_tag (ns, tag)

clear_tags ()

get_artifacts ()

get_context ()

get_date ()

get_date_eol ()

get_description ()

get_issues ()

get_kind ()

get_timestamp ()

get_timestamp_eol ()

get_urgency ()

get_url (url_kind)

get_version ()

has_tag (ns, tag)

remove_tag (ns, tag)

set_context (context)

set_date (date)

set_date_eol (date)

set_description (description, locale)

set_kind (kind)

set_timestamp (timestamp)

set_timestamp_eol (timestamp)

set_urgency (urgency)

set_url (url_kind, url)

set_version (version)

vercmp (rel2)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class AppStream.Release(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

AppStream.ReleaseClass

classmethod new()
Returns:

a AppStream.Release

Return type:

AppStream.Release

Creates a new AppStream.Release.

add_artifact(artifact)
Parameters:

artifact (AppStream.Artifact) – The AppStream.Artifact.

Add an artifact (binary / source download) for this release.

New in version 0.12.6.

add_issue(issue)
Parameters:

issue (AppStream.Issue) – The AppStream.Issue.

Add information about a (resolved) issue to this release.

New in version 0.12.9.

add_tag(ns, tag)
Parameters:
  • ns (str) – The namespace the tag belongs to

  • tag (str) – The tag name

Returns:

True if the tag was added.

Return type:

bool

Add a tag to this release.

New in version 1.0.0.

clear_tags()

Remove all tags associated with this release.

New in version 1.0.0.

get_artifacts()
Returns:

an array of AppStream.Artifact objects.

Return type:

[AppStream.Artifact]

Get a list of all downloadable artifacts that are associated with this release.

New in version 0.12.6.

get_context()
Returns:

the AppStream.Context associated with this release. This function may return None if no context is set.

Return type:

AppStream.Context or None

New in version 0.11.2.

get_date()
Returns:

The date in ISO8601 format.

Return type:

str or None

Gets the release date.

New in version 0.12.5.

get_date_eol()
Returns:

The EOL date in ISO8601 format.

Return type:

str or None

Gets the end-of-life date for this release.

New in version 0.12.5.

get_description()
Returns:

markup, or None for not set or invalid

Return type:

str or None

Gets the release description markup for a given locale.

get_issues()
Returns:

an array of AppStream.Issue objects.

Return type:

[AppStream.Issue]

Get a list of all issues resolved by this release.

New in version 0.12.9.

get_kind()
Return type:

AppStream.ReleaseKind

Gets the type of the release. (development or stable release)

New in version 0.12.0.

get_timestamp()
Returns:

timestamp, or 0 for unset

Return type:

int

Gets the release timestamp.

get_timestamp_eol()
Returns:

UNIX timestamp, or 0 for unset or invalid.

Return type:

int

Gets the UNIX timestamp for the date when this release is out of support (end-of-life).

New in version 0.12.5.

get_urgency()
Returns:

AppStream.UrgencyKind, or AppStream.UrgencyKind.UNKNOWN for not set

Return type:

AppStream.UrgencyKind

Gets the urgency of the release (showing how important it is to update to a more recent release)

New in version 0.6.5.

get_url(url_kind)
Parameters:

url_kind (AppStream.ReleaseUrlKind) – the URL kind, e.g. AppStream.ReleaseUrlKind.DETAILS.

Returns:

string, or None if unset

Return type:

str or None

Gets an URL.

New in version 0.12.5.

get_version()
Returns:

string, or None for not set or invalid

Return type:

str or None

Gets the release version.

has_tag(ns, tag)
Parameters:
  • ns (str) – The namespace the tag belongs to

  • tag (str) – The tag name

Returns:

True if tag exists.

Return type:

bool

Test if the release is tagged with the selected tag.

New in version 1.0.0.

remove_tag(ns, tag)
Parameters:
  • ns (str) – The namespace the tag belongs to

  • tag (str) – The tag name

Returns:

True if the tag was removed.

Return type:

bool

Remove a tag from this release

New in version 1.0.0.

set_context(context)
Parameters:

context (AppStream.Context) – the AppStream.Context.

Sets the document context this release is associated with.

New in version 0.11.2.

set_date(date)
Parameters:

date (str) – the date in ISO8601 format.

Sets the release date.

New in version 0.12.5.

set_date_eol(date)
Parameters:

date (str) – the EOL date in ISO8601 format.

Sets the end-of-life date for this release.

New in version 0.12.5.

set_description(description, locale)
Parameters:
  • description (str) – the description markup.

  • locale (str or None) – the BCP47 locale, or None. e.g. “en-GB”.

Sets the description release markup.

set_kind(kind)
Parameters:

kind (AppStream.ReleaseKind) – the AppStream.ReleaseKind

Sets the release kind to distinguish between end-user ready stable releases and development prereleases..

New in version 0.12.0.

set_timestamp(timestamp)
Parameters:

timestamp (int) – the timestamp value.

Sets the release timestamp.

set_timestamp_eol(timestamp)
Parameters:

timestamp (int) – the timestamp value.

Sets the UNIX timestamp for the date when this release is out of support (end-of-life).

New in version 0.12.5.

set_urgency(urgency)
Parameters:

urgency (AppStream.UrgencyKind) – the urgency of this release/update (as AppStream.UrgencyKind)

Sets the release urgency.

New in version 0.6.5.

set_url(url_kind, url)
Parameters:

Sets an URL for this release.

New in version 0.12.5.

set_version(version)
Parameters:

version (str) – the version string.

Sets the release version.

vercmp(rel2)
Parameters:

rel2 (AppStream.Release) – an AppStream.Release

Returns:

1 if self version is higher than rel2, 0 if versions are equal, -1 if rel2 version is higher than self.

Return type:

int

Compare the version numbers of two releases.