Ram*_*ses 2 rest parse-platform
我在 parse.com 上托管了这个结构:
事件
String
Pointer<Player>
Pointer<Match>
匹配
String
String
Date
我想使用 REST 检索与一场特定比赛相关的所有事件,但我使用的查询有问题。
这是我正在使用的查询(带有 HTTParty gem 的 ruby):
base_uri = "https://api.parse.com/1/classes"
endpoint = 'Event/?&include=matchId&where={"ownerId":"201"}'
app_id = "app_id"
rest_api_key = "api_key"
headers = {"X-Parse-Application-Id" => app_id,
"X-Parse-REST-API-Key" => rest_api_key,
"Content-Type" => "application/json"}
response = HTTParty.get(URI.encode("#{base_uri}/#{endpoint}"), headers: headers)
Run Code Online (Sandbox Code Playgroud)
事实证明,它的完成方式与关系查询相同。这是工作查询:
endpoint = 'Event/?where={"matchId":{"$inQuery":{"where":{"ownerId":201},"className":"Match"}}}'
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1560 次 |
最近记录: |