Skip to content

Parameters

Peter Araujo edited this page Jul 28, 2024 · 1 revision

General

You can configure your request using the available parameters for each endpoint.

Availability

All parameters are supported.

Enum parameters

For some parameters, you have enum values available. You can use them directly on the function.

Convention

Parameters can be obtain using:

{Resource} + {Parameter} + Param

For example, to get an Artwork's Include parameter:

val dateParam = ArtworkIncludeParam.Dates

Alternative

If you need to insert all or some parameters as strings, you can use the complementary raw parameter.

Convention

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")
)

Availability

Depending on the resource, these parameters may be available as enums:

  • Field (for the fields HTTP param).
  • Include (for the include HTTP param).

For every enum parameter, a complementary raw parameter is available.

Clone this wiki locally