BookStack/routes/api.php

37 lines
1.5 KiB
PHP
Raw Normal View History

2019-12-28 09:58:07 -05:00
<?php
/**
* Routes for the BookStack API.
* Routes have a uri prefix of /api/.
* Controllers are all within app/Http/Controllers/Api
2019-12-28 09:58:07 -05:00
*/
2020-01-12 11:25:14 -05:00
Route::get('docs', 'ApiDocsController@display');
Route::get('docs.json', 'ApiDocsController@json');
2020-05-22 19:28:41 -04:00
Route::get('books', 'BookApiController@list');
Route::post('books', 'BookApiController@create');
Route::get('books/{id}', 'BookApiController@read');
Route::put('books/{id}', 'BookApiController@update');
Route::delete('books/{id}', 'BookApiController@delete');
2020-05-22 19:28:41 -04:00
Route::get('books/{id}/export/html', 'BookExportApiController@exportHtml');
Route::get('books/{id}/export/pdf', 'BookExportApiController@exportPdf');
Route::get('books/{id}/export/plaintext', 'BookExportApiController@exportPlainText');
Route::get('chapters', 'ChapterApiController@list');
Route::post('chapters', 'ChapterApiController@create');
Route::get('chapters/{id}', 'ChapterApiController@read');
Route::put('chapters/{id}', 'ChapterApiController@update');
Route::delete('chapters/{id}', 'ChapterApiController@delete');
Route::get('chapters/{id}/export/html', 'ChapterExportApiController@exportHtml');
Route::get('chapters/{id}/export/pdf', 'ChapterExportApiController@exportPdf');
Route::get('chapters/{id}/export/plaintext', 'ChapterExportApiController@exportPlainText');
2020-04-10 11:05:17 -04:00
Route::get('shelves', 'BookshelfApiController@list');
Route::post('shelves', 'BookshelfApiController@create');
Route::get('shelves/{id}', 'BookshelfApiController@read');
Route::put('shelves/{id}', 'BookshelfApiController@update');
2020-05-22 19:28:41 -04:00
Route::delete('shelves/{id}', 'BookshelfApiController@delete');