list method
List ideas for a given Creator and filter and sort options.
Request parameters:
parent
- Required. If defined, specifies the creator for which to filter
by. Format: publishers/{publisher}/properties/{property}
Value must have pattern ^platforms/\[^/\]+/properties/\[^/\]+$
.
filter
- Allows filtering. Supported syntax: * Filter expressions are
made up of one or more restrictions. * Restrictions are implicitly
combined, as if the AND
operator was always used. The OR
operator is
currently unsupported. * Supported functions: - saved(bool)
: If set to
true, fetches only saved ideas. If set to false, fetches all except saved
ideas. Can't be simultaneously used with dismissed(bool)
. -
dismissed(bool)
: If set to true, fetches only dismissed ideas. Can't be
simultaneously used with saved(bool)
. The false
value is currently
unsupported. Examples: * saved(true)
* saved(false)
*
dismissed(true)
The length of this field should be no more than 500
characters.
orderBy
- Order semantics described below.
pageSize
- The maximum number of ideas per page. If unspecified, at most
10 ideas will be returned. The maximum value is 2000; values above 2000
will be coerced to 2000.
pageToken
- Used to fetch next page.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleSearchIdeahubV1betaListIdeasResponse.
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<GoogleSearchIdeahubV1betaListIdeasResponse> list(
core.String parent, {
core.String? filter,
core.String? orderBy,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final _queryParams = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if (orderBy != null) 'orderBy': [orderBy],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final _url = 'v1beta/' + core.Uri.encodeFull('$parent') + '/ideas';
final _response = await _requester.request(
_url,
'GET',
queryParams: _queryParams,
);
return GoogleSearchIdeahubV1betaListIdeasResponse.fromJson(
_response as core.Map<core.String, core.dynamic>);
}