Skip to content

Commit

Permalink
Don't invoke deprecated API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mroloux committed Sep 28, 2021
1 parent d416642 commit 9b7e618
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Events/Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,7 @@ public function updateExtraDatas($eventKey, $extraDatas)
*/
public function retrieveObjectInfo($eventKey, $objectLabel)
{
$res = $this->client->get(UriTemplate::expand('/events/{key}/objects/{object}', ["key" => $eventKey, "object" => $objectLabel]));
$json = \GuzzleHttp\json_decode($res->getBody());
$mapper = SeatsioJsonMapper::create();
return $mapper->map($json, new EventObjectInfo());
return $this->retrieveObjectInfos($eventKey, [$objectLabel])[$objectLabel];
}

/**
Expand Down

0 comments on commit 9b7e618

Please sign in to comment.