This repository has been archived by the owner on Sep 22, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the functionality to review a series and get review metadata from it like ratings.
In the following,
UserReview
/userReview
andOwnerReview
/ownerReview
are getting used. These are structs with the same fields but different methods. A review which was written by the logged-in account cannot be rated as helpful, and is therefore represented as a*OwnerReview
which has only function to manipulate the review. A review written by another person on the other hand, has only functions to interact with it (rating as helpful, ...) and is represented as*UserReview
.Rating
Get the rating of a series.
Returns
*crunchyroll.Rating
.Reviews
Get reviews of a series.
Returns
crunchyroll.BulkResult[*crunchyroll.UserReview]
.CreateReview
Create a review. Title must be 10 characters long or longer and content 100 charaters long or longer.
Returns
*crunchyroll.OwnerReview
.GetOwnerReview
Get the review from the logged-in account. Returns an error if none was written yet.
HasOwnerReview
Returns if the logged-in account has written a review for the series.
Rate
Rate a series.
Edit
Edit your review.
Delete
Delete your review.
RateHelpful
Rate a review as helpul. A review can only be rated once as helpful (or not helpful) and this cannot be undone, so be careful. Check
UserReview.Rated()
if the review is already rated.RateNotHelpful
Rate a review as not helpul. A review can only be rated once as not helpful (or helpful) and this cannot be undone, so be careful. Check
UserReview.Rated()
if the review is already rated.Rated
Check if a review is already rated.
Report
Report a review. Check for
Review.Ratings.Reported
if the review is reported. If this is the case, the function will fail.RemoveReport
Remove a report from a review. Check for
Review.Ratings.Reported
if the review is reported. If this is not the case, the function will fail.