Methods
(async) fetch(resourceId, memberId) → {Review}
Fetch a resource review by a member for a given resource.
Parameters:
Name | Type | Description |
---|---|---|
resourceId |
number | The identifier of the resource. |
memberId |
number | The identifier of the member. |
Returns:
A raw data object.
- Type
- Review
(async) list(resourceId, sort) → {Array.<Review>}
List a page of reviews for a given resource.
Parameters:
Name | Type | Description |
---|---|---|
resourceId |
number | The identifier of the resource. |
sort |
SortOptions | undefined | An optional set of sort options. |
Returns:
An array of raw data objects.
- Type
- Array.<Review>
(async) listAll(resourceId, sort) → {Array.<Review>}
List all pages of reviews for a given resource.
Parameters:
Name | Type | Description |
---|---|---|
resourceId |
number | The identifier of the resource. |
sort |
SortOptions | undefined | An optional set of sort options. |
Returns:
An array of raw data objects.
- Type
- Array.<Review>
(async) listUntil(resourceId, shouldContinue, sort) → {Array.<Review>}
List multiple pages of reviews for a given resource until a condition is no longer met.
Parameters:
Name | Type | Description |
---|---|---|
resourceId |
number | The identifier of the resource. |
shouldContinue |
function | A function which determines if further pages are requested. |
sort |
SortOptions | undefined | An optional set of sort options. |
Returns:
An array of raw data objects.
- Type
- Array.<Review>
(async) respond(resourceId, reviewId, response)
Respond to a review for a given resource.
Parameters:
Name | Type | Description |
---|---|---|
resourceId |
number | The identifier of the resource. |
reviewId |
number | The identifier of the review. |
response |
string | The content of the author response. |