Query data from current user in arrowdb

100 Views Asked by At

how can i query the checkin from a specific user in the api? Like a join with the user and filter by the user_id? It because checkin does not have user_id property.

2

There are 2 best solutions below

1
On

Just did a workaround putting the owner_id as a custom_field in the checkin creation.

0
On

You should be able to use user_id in query checkins API, like following example:

curl -c cookies.txt -b cookies.txt -X GET --data-urlencode 'where={"user_id":"56207d2616d4b1e2de4bbba8"}' "https://api.cloud.appcelerator.com/v1/checkins/query.json?key=myOwnAppKey&pretty_json=true&show_user_like=true&count=true"
{
  "meta": {
    "code": 200,
    "status": "ok",
    "method_name": "queryCheckins",
    "count": 1
  },
  "response": {
     "checkins": [
      {
        "id": "56e67fb3550a680912694e17",
        "created_at": "2016-03-14T09:09:07+0000",
        "updated_at": "2016-03-14T09:09:07+0000",
        "place_id": "56e67edda778ca09086b8ff1",
        "user_id": "56207d2616d4b1e2de4bbba8"
      }
    ]
  }
}