I have this structure hosted on parse.com:
Event
- objectId:
String - playerId:
Pointer<Player> - matchId:
Pointer<Match> - some other properties not relevant to the question
Match
- objectId:
String - ownerId:
String - matchDate:
Date
I want to retrieve all events related to one specific Match using REST, but there is something wrong with the query I'm using.
This is the query I'm using (ruby with HTTParty gem):
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)