... | ... | @@ -189,4 +189,33 @@ Result |
|
|
],
|
|
|
"title": "CryptoParty"
|
|
|
}
|
|
|
``` |
|
|
\ No newline at end of file |
|
|
```
|
|
|
|
|
|
# Facets
|
|
|
|
|
|
Facets provide an easy way to filter results by entity properties.
|
|
|
|
|
|
For each entity there's a predefined set of facets. **TODO The list of available facets***
|
|
|
|
|
|
Facets can be passed to the server by using the facets parameter:
|
|
|
|
|
|
```
|
|
|
https://radar.squat.net/api/1.2/search/events.json?facets[facet][]=value
|
|
|
```
|
|
|
|
|
|
Example
|
|
|
|
|
|
```
|
|
|
https://radar.squat.net/api/1.2/search/events.json?facets[city][]=Berlin
|
|
|
```
|
|
|
|
|
|
Multiple facets can be passed, even the same with different values. When passing the same facet with different values the logical operation (AND, OR) depends on the actual facet. This is in the list of facets, it's also usually visible from doing a search and using the facets on the front end.
|
|
|
|
|
|
Example
|
|
|
|
|
|
```
|
|
|
category operator is AND, this call returns events which have both the bar/cafe AND theater category
|
|
|
https://radar.squat.net/api/1.2/search/events.json?facets[category][]=bar-cafe&facets[category][]=theater
|
|
|
group operator is OR, this call returns events organized by group 339006 OR 1599
|
|
|
https://radar.squat.net/api/1.2/search/events.json?facets[group][]=339006&fields=*&facets[group][]=1599
|
|
|
``` |