AppStream.Artifact

g AppStream.Artifact AppStream.Artifact GObject.Object GObject.Object GObject.Object->AppStream.Artifact

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

add_checksum (cs)

add_location (location)

get_bundle_kind ()

get_checksum (kind)

get_checksums ()

get_filename ()

get_kind ()

get_locations ()

get_platform ()

get_size (kind)

set_bundle_kind (kind)

set_filename (filename)

set_kind (kind)

set_platform (platform)

set_size (size, kind)

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.Artifact(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

AppStream.ArtifactClass

classmethod new()
Returns:

a AppStream.Artifact

Return type:

AppStream.Artifact

Creates a new AppStream.Artifact.

add_checksum(cs)
Parameters:

cs (AppStream.Checksum) – The AppStream.Checksum.

Add a checksum for the file associated with this artifact.

add_location(location)
Parameters:

location (str) – An URL of the download location

Adds a artifact location.

get_bundle_kind()
Returns:

the AppStream.BundleKind

Return type:

AppStream.BundleKind

Gets the bundle kind of this artifact.

get_checksum(kind)
Parameters:

kind (AppStream.ChecksumKind) –

Returns:

an AppStream.Checksum, or None for not set or invalid

Return type:

AppStream.Checksum or None

Gets the artifact checksum

get_checksums()
Returns:

an array of AppStream.Checksum objects.

Return type:

[AppStream.Checksum]

Get a list of all checksums we have for this artifact.

get_filename()
Returns:

The platform triplet or identifier string.

Return type:

str

Gets a suggested filename for the downloaded artifact, or None if none is suggested.

get_kind()
Returns:

the AppStream.ArtifactKind

Return type:

AppStream.ArtifactKind

Gets the artifact kind.

get_locations()
Returns:

list of locations

Return type:

[str]

Gets the artifact locations, typically URLs.

get_platform()
Returns:

The platform triplet or identifier string.

Return type:

str

Gets the artifact platform string (e.g. a triplet like “x86_64-linux-gnu”).

get_size(kind)
Parameters:

kind (AppStream.SizeKind) – a AppStream.SizeKind

Returns:

The size of the given kind of this artifact.

Return type:

int

Gets the artifact size.

set_bundle_kind(kind)
Parameters:

kind (AppStream.BundleKind) – the AppStream.BundleKind, e.g. AppStream.BundleKind.TARBALL.

Sets the bundle kind for this release artifact.

set_filename(filename)
Parameters:

filename (str) – the file name suggestion.

Sets a suggested filename for this artifact after it has been downloaded.

set_kind(kind)
Parameters:

kind (AppStream.ArtifactKind) – the AppStream.ArtifactKind, e.g. AppStream.ArtifactKind.SOURCE.

Sets the artifact kind.

set_platform(platform)
Parameters:

platform (str) – the platform triplet.

Sets the artifact platform triplet or identifier string.

set_size(size, kind)
Parameters:

Sets the artifact size for the given kind.