【问题标题】:Query data from current user in arrowdb在 arrowdb 中查询当前用户的数据
【发布时间】:2016-03-11 17:30:46
【问题描述】:

如何在 api 中查询特定用户的签到?像加入用户并按 user_id 过滤?这是因为 checkin 没有 user_id 属性。

【问题讨论】:

    标签: appcelerator appcelerator-arrow arrowdb


    【解决方案1】:

    刚刚做了一个解决方法,将 owner_id 作为一个 custom_field 在签入创建中。

    【讨论】:

    • 没错,之前没有工作过……但肯定是我的错!
    【解决方案2】:

    您应该能够在查询签入 API 中使用 user_id,如以下示例:

    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"
          }
        ]
      }
    }
    

    【讨论】:

      猜你喜欢
      • 2014-04-13
      • 2015-12-21
      • 2019-05-12
      • 1970-01-01
      • 1970-01-01
      • 2021-04-12
      • 1970-01-01
      • 2019-03-27
      • 1970-01-01
      相关资源
      最近更新 更多