Beispiel #1
0
        Route::get('lastfm/connect', 'LastfmController@connect');
        Route::post('lastfm/session-key', 'LastfmController@setSessionKey');
        Route::get('lastfm/callback', ['as' => 'lastfm.callback', 'uses' => 'LastfmController@callback']);
        Route::delete('lastfm/disconnect', 'LastfmController@disconnect');
        // YouTube-related routes
        if (YouTube::enabled()) {
            Route::get('youtube/search/song/{song}', 'YouTubeController@searchVideosRelatedToSong');
        }
        // Download routes
        Route::group(['prefix' => 'download', 'namespace' => 'Download'], function () {
            Route::get('songs', 'SongController@download');
            Route::get('album/{album}', 'AlbumController@download');
            Route::get('artist/{artist}', 'ArtistController@download');
            Route::get('playlist/{playlist}', 'PlaylistController@download');
            Route::get('favorites', 'FavoritesController@download');
        });
        // Info routes
        if (Lastfm::used()) {
            Route::get('album/{album}/info', 'AlbumController@getInfo');
            Route::get('artist/{artist}/info', 'ArtistController@getInfo');
        }
    });
    Route::group(['middleware' => 'os.auth', 'prefix' => 'os', 'namespace' => 'ObjectStorage'], function () {
        Route::group(['prefix' => 's3', 'namespace' => 'S3'], function () {
            Route::post('song', 'SongController@put');
            // we follow AWS's convention here.
            Route::delete('song', 'SongController@remove');
            // and here.
        });
    });
});