-
-
Notifications
You must be signed in to change notification settings - Fork 0
Parameters
Peter Araujo edited this page Jul 28, 2024
·
1 revision
You can configure your request using the available parameters for each endpoint.
All parameters are supported.
For some parameters, you have enum values available. You can use them directly on the function.
Parameters can be obtain using:
{Resource} + {Parameter} + Param
For example, to get an Artwork's Include parameter:
val dateParam = ArtworkIncludeParam.DatesIf you need to insert all or some parameters as strings, you can use the complementary raw parameter.
Raw parameters can be used like this:
raw + {Parameter}
For example, to add fields as string values:
val artworkService = ArtworkService()
val response = artworkService.getItems(
rawFields = listOf("id", "title")
)You can add both enum and raw parameters as needed. They will be combine into one list internally.
For example:
val artworkService = ArtworkService()
val response = artworkService.getItems(
fields = listOf(ArtworkFieldParam.ArtistId),
rawFields = listOf("id", "title")
)Depending on the resource, these parameters may be available as enums:
- Field (for the
fieldsHTTP param). - Include (for the
includeHTTP param).
For every enum parameter, a complementary raw parameter is available.