public static function find($id) { self::_validateId($id); try { $response = GameRocket_Http::get('/games/' . $id); return self::factory($response['game']); } catch (GameRocket_Exception_NotFound $e) { throw new GameRocket_Exception_NotFound('Game with id ' . $id . ' not found.'); } }
public static function find($id) { self::_validateId($id); try { $response = GameRocket_Http::get('/games/' . GameRocket_Configuration::apikey() . '/purchases/' . $id); return self::factory($response['purchase']); } catch (GameRocket_Exception_NotFound $e) { throw new GameRocket_Exception_NotFound('Purchase with id ' . $id . ' not found.'); } }
public static function find($player, $id, $params) { self::_validateId($player); self::_validateId($id); try { $response = GameRocket_Http::get('/players/' . $player . '/achievements/' . $id, $params); return self::factory($response['achievement']); } catch (GameRocket_Exception_NotFound $e) { throw new GameRocket_Exception_NotFound('Achievement with id ' . $id . ' not found.'); } }