Exemplo n.º 1
0
 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.');
     }
 }
Exemplo n.º 2
0
 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.');
     }
 }
Exemplo n.º 3
0
 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.');
     }
 }