get method
Returns a stream of personalized book clusters
Request parameters:
locale
- ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.
Used for generating recommendations.
maxAllowedMaturityRating
- The maximum allowed maturity rating of
returned recommendations. Books with a higher maturity rating are filtered
out.
Possible string values are:
- "MAX_ALLOWED_MATURITY_RATING_UNDEFINED"
- "MATURE" : Show books which are rated mature or lower.
- "not-mature" : Show books which are rated not mature.
source
- String to identify the originator of this request.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a Discoveryclusters.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<Discoveryclusters> get({
core.String? locale,
core.String? maxAllowedMaturityRating,
core.String? source,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (locale != null) 'locale': [locale],
if (maxAllowedMaturityRating != null)
'maxAllowedMaturityRating': [maxAllowedMaturityRating],
if (source != null) 'source': [source],
if ($fields != null) 'fields': [$fields],
};
const url_ = 'books/v1/personalizedstream/get';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Discoveryclusters.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}