-
Notifications
You must be signed in to change notification settings - Fork 0
Search API
There's three main search APIs for Sunday Peak, searchUsers, searchAdventures, and searchZones. This section describes how to call each of the search endpoints to retrieve data.
The searchAdventures and searchZones APIs don't require an AuthToken and are meant to be used without logging in. The searchUsers API requires a token and returns data about a given user. The userId of the user making the search is also logged with every search call.
This query sends a full-text search string and gets back a list of users matching the string.
Note: The string must include full words expected in the result
This query returns user data and needs an auth token to be used.
https://api.sundaypeak.com/search/users?id=<UserId>&friends=<AmongFriends>&q=<SearchString>
Content-Type: application/json
HTTP Method: GETSearchString is a string type.
UserId is the id of the current user. This parameter is not required. If included, the results will not return the current user.
AmongFriends is a boolean to check only the user's friends.
{
data: {
search_results: ShortUser[]
},
status_code: Int
timestamp: Int
}| Key | Type | Description |
|---|---|---|
| search_results | ShortUser[] | A list of shortened user objects that meet the search criteria |
| status_code | Int | |
| timestamp | Int |
This query sends a full-text search string and gets back a list of adventures matching the string.
Note: The string must include full words expected in the result
https://api.sundaypeak.com/search/adventures?q=<SearchString>&id=<ZoneId>
Content-Type: application/json
HTTP Method: GETSearchString is a string type.
ZoneId is the id of a parent zone. If this is provided, then no direct children will show up in the search. This parameter is not required.
{
data: {
search_results: ShortAdventure[]
},
status_code: Int
timestamp: Int
}| Key | Type | Description |
|---|---|---|
| search_results | ShortAdventure[] | A list of shortened adventure objects that meet the search criteria |
| status_code | Int | |
| timestamp | Int |
This query sends a full-text search string and gets back a list of zones matching the string.
Note: The string must include full words expected in the result
https://api.sundaypeak.com/search/zoens?q=<SearchString>&id=<ZoneId>
Content-Type: application/json
HTTP Method: GETSearchString is a string type.
ZoneId is the id of a parent zone. If this is provided, then no direct children will show up in the search. This parameter is not required.
{
data: {
search_results: ShortZone[]
},
status_code: Int
timestamp: Int
}| Key | Type | Description |
|---|---|---|
| search_results | ShortZone[] | A list of shortened zone objects that meet the search criteria |
| status_code | Int | |
| timestamp | Int |