AppStream.Review¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/c/en |
|||
r/w/c/en |
|||
r/w/c/en |
|||
r/w/c/en |
|||
r/w/c/en |
|||
r/w/c/en |
|||
r/w/c/en |
|||
r/w/c/en |
|||
r/w/c/en |
|||
r/w/c/en |
|||
r/w/c/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class AppStream.Review(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
- Return type:
Creates a new
AppStream.Review
.New in version 0.14.0.
- add_flags(flags)¶
- Parameters:
flags (
AppStream.ReviewFlags
) – aAppStream.ReviewFlags
, e.g.AppStream.ReviewFlags.SELF
Adds flags to an existing review without replacing the other flags.
New in version 0.14.0.
- add_metadata(key, value)¶
-
Adds metadata to the review object. It is left for the the plugin to use this method as required, but a typical use would be to store some secure authentication token.
New in version 0.14.0.
- equal(review2)¶
- Parameters:
review2 (
AppStream.Review
) – aAppStream.Review
instance.- Returns:
True
for success- Return type:
Checks if two reviews are the same.
New in version 0.14.0.
- get_date()¶
- Returns:
the
GLib.DateTime
, orNone
for unset- Return type:
Gets the date the review was originally submitted.
New in version 0.14.0.
- get_description()¶
-
Gets the multi-line review text that forms the body of the review.
New in version 0.14.0.
- get_flags()¶
- Returns:
- Return type:
Gets any flags set on the review, for example if the user has already voted on the review or if the user wrote the review themselves.
New in version 0.14.0.
- get_id()¶
- Returns:
the review identifier, e.g. “deadbeef”
- Return type:
Gets the review id.
New in version 0.14.0.
- get_locale()¶
-
Gets the locale for the review.
New in version 0.14.0.
- get_metadata_item(key)¶
-
Gets some metadata from a review object. It is left for the the plugin to use this method as required, but a typical use would be to retrieve some secure authentication token.
New in version 0.14.0.
- get_priority()¶
- Returns:
the review priority, or 0 for unset.
- Return type:
This allows the UI to sort reviews into the correct order. Higher numbers indicate a more important or relevant review.
New in version 0.14.0.
- get_rating()¶
- Returns:
integer as a percentage, or 0 for unset
- Return type:
Gets the star rating of the review, where 100 is 5 stars.
New in version 0.14.0.
- get_reviewer_id()¶
-
Gets the name of the reviewer.
New in version 0.14.0.
- get_reviewer_name()¶
-
Gets the name of the reviewer.
New in version 0.14.0.
- get_summary()¶
- Returns:
the one-line summary, e.g. “Awesome application”
- Return type:
Gets the review summary.
New in version 0.14.0.
- get_version()¶
-
Gets the version string for the application being reviewed..
New in version 0.14.0.
- set_date(date)¶
- Parameters:
date (
GLib.DateTime
) – aGLib.DateTime
, orNone
Sets the date the review was originally submitted.
New in version 0.14.0.
- set_description(description)¶
- Parameters:
description (
str
) – multi-line description
Sets the multi-line review text that forms the body of the review.
New in version 0.14.0.
- set_flags(flags)¶
- Parameters:
flags (
AppStream.ReviewFlags
) – aAppStream.ReviewFlags
, e.g.AppStream.ReviewFlags.SELF
Gets any flags set on the review, for example if the user has already voted on the review or if the user wrote the review themselves.
New in version 0.14.0.
- set_id(id)¶
- Parameters:
id (
str
) – review identifier, e.g. “deadbeef”
Sets the review identifier that is unique to each review.
New in version 0.14.0.
- set_locale(locale)¶
- Parameters:
locale (
str
) – a BCP47 locale, e.g. “en-GB”
Sets the locale for the review.
New in version 0.14.0.
- set_priority(priority)¶
- Parameters:
priority (
int
) – a priority value
Sets the priority for the review, where positive numbers indicate a better review for the specific user.
New in version 0.14.0.
- set_rating(rating)¶
- Parameters:
rating (
int
) – a integer as a percentage, or 0 for unset
Sets the star rating of the review, where 100 is 5 stars..
New in version 0.14.0.
- set_reviewer_id(reviewer_id)¶
- Parameters:
reviewer_id (
str
) – the reviewer ID, e.g. “deadbeef”
Sets the name of the reviewer, which can be left unset.
New in version 0.14.0.
- set_reviewer_name(reviewer_name)¶
- Parameters:
reviewer_name (
str
) – the reviewer name, e.g. “David Smith”
Sets the name of the reviewer, which can be left unset.
New in version 0.14.0.
Property Details¶
- AppStream.Review.props.date¶
- Name:
date
- Type:
- Default Value:
- Flags:
New in version 0.14.0.
- AppStream.Review.props.description¶
- Name:
description
- Type:
- Default Value:
- Flags:
New in version 0.14.0.
- AppStream.Review.props.flags¶
- Name:
flags
- Type:
- Default Value:
0
- Flags:
New in version 0.14.0.
- AppStream.Review.props.id¶
-
New in version 0.14.0.
- AppStream.Review.props.locale¶
-
New in version 0.14.0.
- AppStream.Review.props.priority¶
- Name:
priority
- Type:
- Default Value:
0
- Flags:
The priority for the review, where positive numbers indicate a better review for the specific user.
New in version 0.15.6.
- AppStream.Review.props.rating¶
- Name:
rating
- Type:
- Default Value:
0
- Flags:
New in version 0.14.0.
- AppStream.Review.props.reviewer_id¶
- Name:
reviewer-id
- Type:
- Default Value:
- Flags:
New in version 0.14.0.
- AppStream.Review.props.reviewer_name¶
- Name:
reviewer-name
- Type:
- Default Value:
- Flags:
New in version 0.14.0.
- AppStream.Review.props.summary¶
-
New in version 0.14.0.