Skip to content

Instantly share code, notes, and snippets.

@gsemino
Last active May 31, 2017 23:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gsemino/ed41bb4be5fc5f1d856818f4335449d6 to your computer and use it in GitHub Desktop.
Save gsemino/ed41bb4be5fc5f1d856818f4335449d6 to your computer and use it in GitHub Desktop.
SYNQ userdata Query API example
//userdata query find all every where year is 2017 and the model name is c
if (video.userdata.cars)
{
if (video.userdata.cars[0]["year"] == 2017 &&
_.includes(video.userdata.cars[0].models, "c"))
{
return {"id":video.video_id, "cars_userdata": video.userdata.cars}
}
}
//sample body response from Query API:
[
{
"id": "61ed487958d54b278f47881234567891",
"cars_userdata": [
{
"make": "mercedes",
"year": 2017,
"models": [
"slk",
"c",
"cls"
]
}
]
},
{
"id": "07de8dc488e64803b85aae1234567891",
"cars_userdata": [
{
"make": "lexus",
"year": 2017,
"models": [
"c",
"cl",
"lv"
]
}
]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment