mirror of
https://github.com/tcgdex/cards-database.git
synced 2025-06-18 18:29:19 +00:00
feat: Add advanced filtering capabilities (#522)
This commit is contained in:
25
.bruno/cards/advanced-query.bru
Normal file
25
.bruno/cards/advanced-query.bru
Normal file
@ -0,0 +1,25 @@
|
||||
meta {
|
||||
name: Advanced Query
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{BASE_URL}}/v2/en/cards?name=eq:Pikachu&hp=gte:60&hp=lt:70&localId=5&localId=not:tg&id=neq:cel25-5
|
||||
body: none
|
||||
auth: none
|
||||
}
|
||||
|
||||
params:query {
|
||||
name: eq:Pikachu
|
||||
hp: gte:60
|
||||
hp: lt:70
|
||||
localId: 5
|
||||
localId: not:tg
|
||||
id: neq:cel25-5
|
||||
}
|
||||
|
||||
assert {
|
||||
res.status: eq 200
|
||||
res.body: length 14
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
vars {
|
||||
BASE_URL: http://localhost:3000
|
||||
BASE_URL: http://127.0.0.1:3000
|
||||
}
|
||||
|
21
.bruno/sets/Advanced Query.bru
Normal file
21
.bruno/sets/Advanced Query.bru
Normal file
@ -0,0 +1,21 @@
|
||||
meta {
|
||||
name: Advanced Query
|
||||
type: http
|
||||
seq: 4
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{BASE_URL}}/v2/en/sets?cardCount.official=gt:64&id=swsh
|
||||
body: none
|
||||
auth: none
|
||||
}
|
||||
|
||||
params:query {
|
||||
cardCount.official:gt: 64
|
||||
id: swsh
|
||||
}
|
||||
|
||||
assert {
|
||||
res.status: eq 200
|
||||
res.body: length 17
|
||||
}
|
Reference in New Issue
Block a user