Game API calls.
このコミットが含まれているのは:
コミット
23709ffbac
|
@ -7,29 +7,42 @@ use Illuminate\Http\Request;
|
|||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class StoreController extends Controller {
|
||||
// Category
|
||||
// Game
|
||||
public function getGames() { // /api/rpc/store/game/getgames
|
||||
return DB::table('str_games')
|
||||
->select('*')
|
||||
->get();
|
||||
}
|
||||
|
||||
public function getGame($id) { // /api/rpc/store/game/getgame/id
|
||||
return DB::table('str_games')
|
||||
->select('*')
|
||||
->where('id', $id)
|
||||
->get();
|
||||
}
|
||||
|
||||
// Category
|
||||
public function getCategories() { // /api/rpc/store/category/getcategories
|
||||
return DB::table('str_category')
|
||||
->select('*')
|
||||
->get();
|
||||
}
|
||||
|
||||
public function getCategory($id) { // /api/rpc/store/category/getcategory/1
|
||||
public function getCategory($id) { // /api/rpc/store/category/getcategory/id
|
||||
return DB::table('str_category')
|
||||
->select('*')
|
||||
->where('id', $id)
|
||||
->get();
|
||||
}
|
||||
|
||||
public function getCategoryGame($id) { // /api/rpc/store/category/getcategorygame/1
|
||||
public function getCategoryGame($id) { // /api/rpc/store/category/getcategorygame/id
|
||||
return DB::table('str_category')
|
||||
->select('game_id')
|
||||
->where('id', $id)
|
||||
->get();
|
||||
}
|
||||
|
||||
public function getCategoryMinScreenshots($id) { // /api/rpc/store/category/getcategoryminscrot/1
|
||||
public function getCategoryMinScreenshots($id) { // /api/rpc/store/category/getcategoryminscrot/id
|
||||
return DB::table('str_category')
|
||||
->select('min_screenshots')
|
||||
->where('id', $id)
|
||||
|
|
|
@ -11,6 +11,10 @@
|
|||
|
|
||||
*/
|
||||
|
||||
// Games
|
||||
Route::get('/api/rpc/store/games/getgames', 'StoreController@getGames');
|
||||
Route::get('/api/rpc/store/games/getgame/{id}', 'StoreController@getGame');
|
||||
|
||||
// Category
|
||||
Route::get('/api/rpc/store/category/getcategories', 'StoreController@getCategories');
|
||||
Route::get('/api/rpc/store/category/getcategory/{id}', 'StoreController@getCategory');
|
||||
|
|
新しいイシューから参照