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.Added 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.
Added 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.
Added in version 0.6.1.
- equal(review2)[source]¶
- Parameters:
review2 (
AppStreamGlib.Review) – aAppStreamGlib.Reviewinstance.- Returns:
Truefor success- Return type:
Checks if two reviews are the same.
Added in version 0.6.1.
- get_date()[source]¶
- Returns:
the
GLib.DateTime, orNonefor unset- Return type:
Gets the date the review was originally submitted.
Added in version 0.6.1.
- get_description()[source]¶
-
Gets the multi-line review text that forms the body of the review.
Added 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.
Added in version 0.6.1.
- get_id()[source]¶
- Returns:
the review identifier, e.g. “deadbeef”
- Return type:
Gets the review id.
Added 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.
Added 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.
Added 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.
Added in version 0.6.1.
- get_summary()[source]¶
- Returns:
the one-line summary, e.g. “Awesome application”
- Return type:
Gets the review summary.
Added in version 0.6.1.
- get_version()[source]¶
-
Gets the version string for the application being reviewed..
Added in version 0.6.1.
- set_date(date)[source]¶
- Parameters:
date (
GLib.DateTime) – aGLib.DateTime, orNone
Sets the date the review was originally submitted.
Added 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.
Added 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.
Added 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.
Added in version 0.6.1.
- set_locale(locale)[source]¶
- Parameters:
locale (
str) – locale, e.g. “en_GB”
Sets the locale for the review.
Added 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.
Added 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..
Added 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.
Added 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.
Added in version 0.6.1.
Property Details¶
- AppStreamGlib.Review.props.date¶
- Name:
date- Type:
- Default Value:
- Flags:
Added in version 0.6.1.
- AppStreamGlib.Review.props.description¶
-
Added in version 0.6.1.
- AppStreamGlib.Review.props.flags¶
-
Added in version 0.6.1.
- AppStreamGlib.Review.props.id¶
-
Added in version 0.6.1.
- AppStreamGlib.Review.props.locale¶
-
Added in version 0.6.1.
- AppStreamGlib.Review.props.rating¶
-
Added in version 0.6.1.
- AppStreamGlib.Review.props.reviewer_id¶
-
Added in version 0.6.1.
- AppStreamGlib.Review.props.reviewer_name¶
-
Added in version 0.6.1.
- AppStreamGlib.Review.props.summary¶
-
Added in version 0.6.1.