V1 Sneakers

부분 유료
분류별 TG4 Solutions | 업데이트됨 hace 19 días | Data
인기

9.1 / 10

지연 시간

1,849ms

서비스 수준

99%

Health Check

N/A

모든 토론으로 돌아가기

The sort parameter

Rapid account: Professor AO
ProfessorAO
hace un año

How do I use the sort Parameter? What is an example input?

Rapid account: Vincent Sanders
vincent.sanders Commented hace un año

The above is for filtering but here is the entire documentation for both filtering and sorting:

Filtering
The following example retrieves all Jordan sneakers that were released in 2019 or after.

https://api.thesneakerdatabase.com/v2/sneakers?limit=10&brand=jordan&releaseYear=gte:2019

Date Filtering Considerations
When filtering on date and using the less than and equal to operator, please be aware that sneakers missing a release date may be returned in the results. Currently, these sneakers have a release year of 0. This may require you to add some additional logic to filter out these sneakers.Please remember that dates must be in the YYYY-MM-DD format.

As of this release the following operations are available:
lt – less than
gt – greater than
lte – less than or equal to
gte – greater than or equal to
lte – less than or equal to

Sorting
The default sort order for queries is descending by release date. Filtering is required in order to ignore unreleased sneakers as they will be returned first.

The following request will return all vans sneakers by retail price in descending order. Please notice the “:” between the sort field and the sort order.

https://api.thesneakerdatabase.com/v2/sneakers?limit=10&brand=vans&sort=retailPrice:desc

To sort in ascending order replace “desc” with “asc”.

https://api.thesneakerdatabase.com/v2/sneakers?limit=10&brand=vans&sort=retailPrice:asc

Sort order is ignored when searching by name, as our interest is returning the most relevant sneakers first.

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입