Open nickevansuk opened 6 years ago
@nickevansuk this looks good to me but have the following thoughts:
offers[].price
(same syntax as in JQ https://stedolan.github.io/jq/manual/#Array/ObjectValueIterator:.[] )fields=name,activity
, fields=name&fields=activity
, fields[]=name&fields[]=activity
, etc
Use Case
For mobile device usecases, a restricted number of fields returned enables the implementer to minimise data transfer.
References
Proposal
The
fields
keyword is reserved to allow for the restriction of properties returned in the response./sessions?fields=name,startDate,subEvent[1].startDate,subEvent[1].endDate
Examples
/sessions?fields=name,activity,location.address,offers.name,offers.price,offers.priceCurrency
/sessions?fields=name,activity,location.address.postalCode,offers[1].price,offers[1].priceCurrency,offers[2].name