AppStreamGlib.Review¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/c |
|||
r/w/c |
|||
r/w/c |
|||
r/w/c |
|||
r/w/c |
|||
r/w/c |
|||
r/w/c |
|||
r/w/c |
|||
r/w/c |
|||
r/w/c |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class AppStreamGlib.Review(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()[source]¶
- Returns:
- Return type:
Creates a new
AppStreamGlib.Review
.New in version 0.6.1.
- add_flags(flags)[source]¶
- Parameters:
flags (
AppStreamGlib.ReviewFlags
) – aAppStreamGlib.ReviewFlags
, e.g.AppStreamGlib.ReviewFlags.SELF
Adds flags to an existing review without replacing the other flags.
New in version 0.6.1.
- add_metadata(key, value)[source]¶
-
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.6.1.
- equal(review2)[source]¶
- Parameters:
review2 (
AppStreamGlib.Review
) – aAppStreamGlib.Review
instance.- Returns:
True
for success- Return type:
Checks if two reviews are the same.
New in version 0.6.1.
- get_date()[source]¶
- Returns:
the
GLib.DateTime
, orNone
for unset- Return type:
Gets the date the review was originally submitted.
New in version 0.6.1.
- get_description()[source]¶
-
Gets the multi-line review text that forms the body of the review.
New in version 0.6.1.
- get_flags()[source]¶
- Returns:
a
AppStreamGlib.ReviewFlags
, e.g.AppStreamGlib.ReviewFlags.SELF
- 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.6.1.
- get_id()[source]¶
- Returns:
the review identifier, e.g. “deadbeef”
- Return type:
Gets the review id.
New in version 0.6.1.
- get_metadata_item(key)[source]¶
-
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.6.1.
- get_priority()[source]¶
- 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.6.1.
- get_rating()[source]¶
- 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.6.1.
- get_summary()[source]¶
- Returns:
the one-line summary, e.g. “Awesome application”
- Return type:
Gets the review summary.
New in version 0.6.1.
- get_version()[source]¶
-
Gets the version string for the application being reviewed..
New in version 0.6.1.
- set_date(date)[source]¶
- Parameters:
date (
GLib.DateTime
) – aGLib.DateTime
, orNone
Sets the date the review was originally submitted.
New in version 0.6.1.
- set_description(description)[source]¶
- Parameters:
description (
str
) – multi-line description
Sets the multi-line review text that forms the body of the review.
New in version 0.6.1.
- set_flags(flags)[source]¶
- Parameters:
flags (
AppStreamGlib.ReviewFlags
) – aAppStreamGlib.ReviewFlags
, e.g.AppStreamGlib.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.6.1.
- set_id(id)[source]¶
- Parameters:
id (
str
) – review identifier, e.g. “deadbeef”
Sets the review identifier that is unique to each review.
New in version 0.6.1.
- set_locale(locale)[source]¶
- Parameters:
locale (
str
) – locale, e.g. “en_GB”
Sets the locale for the review.
New in version 0.6.1.
- set_priority(priority)[source]¶
- 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.6.1.
- set_rating(rating)[source]¶
- 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.6.1.
- set_reviewer_id(reviewer_id)[source]¶
- 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.6.1.
- set_reviewer_name(reviewer_name)[source]¶
- 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.6.1.
Property Details¶
- AppStreamGlib.Review.props.date¶
- Name:
date
- Type:
- Default Value:
- Flags:
New in version 0.6.1.
- AppStreamGlib.Review.props.description¶
-
New in version 0.6.1.
- AppStreamGlib.Review.props.flags¶
-
New in version 0.6.1.
- AppStreamGlib.Review.props.id¶
-
New in version 0.6.1.
- AppStreamGlib.Review.props.locale¶
-
New in version 0.6.1.
- AppStreamGlib.Review.props.rating¶
-
New in version 0.6.1.
- AppStreamGlib.Review.props.reviewer_id¶
-
New in version 0.6.1.
- AppStreamGlib.Review.props.reviewer_name¶
-
New in version 0.6.1.
- AppStreamGlib.Review.props.summary¶
-
New in version 0.6.1.