2021-09-11 13:05:58 +00:00
|
|
|
/*
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Routes
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
| This file is dedicated for defining HTTP routes. A single file is enough
|
|
|
|
|
| for majority of projects, however you can define routes in different
|
|
|
|
|
| files and just make sure to import them inside this file. For example
|
|
|
|
|
|
|
|
|
|
|
| Define routes in following two files
|
|
|
|
|
| ├── start/routes/cart.ts
|
|
|
|
|
| ├── start/routes/customer.ts
|
|
|
|
|
|
|
|
|
|
|
| and then import them inside `start/routes.ts` as follows
|
|
|
|
|
|
|
|
|
|
|
| import './routes/cart'
|
|
|
|
|
| import './routes/customer'
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
2021-09-11 16:08:30 +00:00
|
|
|
import HealthCheck from '@ioc:Adonis/Core/HealthCheck'
|
2021-09-11 13:05:58 +00:00
|
|
|
import Route from '@ioc:Adonis/Core/Route'
|
|
|
|
|
|
2021-09-12 14:35:50 +00:00
|
|
|
Route.get('/', async () => ({
|
|
|
|
|
hi: 'Hello World from LeagueStats V2 API',
|
|
|
|
|
uptime: process.uptime(),
|
|
|
|
|
}))
|
|
|
|
|
|
|
|
|
|
Route.get('/health', async () => ({ report: await HealthCheck.getReport() }))
|
|
|
|
|
|
|
|
|
|
Route.post('/summoner/basic', 'SummonersController.basic')
|
|
|
|
|
Route.post('/summoner/overview', 'SummonersController.overview')
|
|
|
|
|
|
2021-09-18 19:21:13 +00:00
|
|
|
Route.post('/summoner/champions', 'SummonersController.champions')
|
2021-09-16 11:49:32 +00:00
|
|
|
Route.post('/summoner/records', 'SummonersController.records')
|
2021-09-17 20:57:57 +00:00
|
|
|
Route.post('/summoner/live', 'SummonersController.liveMatchDetails')
|
2021-09-12 14:35:50 +00:00
|
|
|
|
2021-09-14 11:49:24 +00:00
|
|
|
Route.post('/match', 'MatchesController.index')
|
2021-09-16 15:10:09 +00:00
|
|
|
Route.post('/match/details', 'MatchesController.show')
|
2021-09-16 20:29:20 +00:00
|
|
|
Route.post('/match/details/ranks', 'MatchesController.showRanks')
|
2021-09-12 14:35:50 +00:00
|
|
|
|
2021-09-13 22:55:19 +00:00
|
|
|
Route.get('/cdragon/runes', 'CDragonController.runes')
|