X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/04137e7c98cfe182f3c603e7d1acbc9a0ed524e7..refs/pull/2023/head:/routes/api.php diff --git a/routes/api.php b/routes/api.php index 0604ffd29..f9c27b62f 100644 --- a/routes/api.php +++ b/routes/api.php @@ -2,11 +2,25 @@ /** * Routes for the BookStack API. - * * Routes have a uri prefix of /api/. + * Controllers are all within app/Http/Controllers/Api */ +Route::get('docs', 'ApiDocsController@display'); +Route::get('docs.json', 'ApiDocsController@json'); -// TODO - Authenticate middleware +Route::get('books', 'BooksApiController@list'); +Route::post('books', 'BooksApiController@create'); +Route::get('books/{id}', 'BooksApiController@read'); +Route::put('books/{id}', 'BooksApiController@update'); +Route::delete('books/{id}', 'BooksApiController@delete'); -Route::get('books', 'BooksApiController@index'); \ No newline at end of file +Route::get('books/{id}/export/html', 'BooksExportApiController@exportHtml'); +Route::get('books/{id}/export/pdf', 'BooksExportApiController@exportPdf'); +Route::get('books/{id}/export/plaintext', 'BooksExportApiController@exportPlainText'); + +Route::get('shelves', 'BookshelfApiController@list'); +Route::post('shelves', 'BookshelfApiController@create'); +Route::get('shelves/{id}', 'BookshelfApiController@read'); +Route::put('shelves/{id}', 'BookshelfApiController@update'); +Route::delete('shelves/{id}', 'BookshelfApiController@delete'); \ No newline at end of file