Documentation

RouteArtists
in package

Table of Contents

listByFirstLetterRoute()  : mixed
listRoute()  : mixed
searchRoute()  : mixed

Methods

listByFirstLetterRoute()

public listByFirstLetterRoute(mixed $request, mixed $response, mixed $args) : mixed
Parameters
$request : mixed
$response : mixed
$args : mixed
Tags
OA\Post

( path="/{game_route}/artists/list_by_first_letter/{first_letter}", summary="Returns artist data", description="A list of artists whose name starts with a provided letter", operationId="artistsListByFirstLetterRoute", tags={"Artists"}, @OA\Parameter( description="First letter of an artist's name", in="path", name="first_letter", required=true, @OA\Schema(type="string"), @OA\Examples(example="string", value="q", summary="Using an artist name's first letter"), ), @OA\Parameter( ref="#/components/parameters/game_route" ), @OA\Response( response=200, description="OK", @OA\JsonContent( type="object", @OA\Property(
property="status", ref="#/components/schemas/RGWRequestStatus" ), @OA\Property( property="data", type="object", @OA\Property( property="artists", ref="#/components/schemas/Artist" ), @OA\Property( property="pagination", ref="#/components/schemas/RGWResponsePagination" ), @OA\Property( property="records", ref="#/components/schemas/RGWResponseCount" ) ), @OA\Examples(example="Success", value={"status": "success","data": {"records": {"total_available": 7538,"total_filtered": 308,"returned": 20},"pagination": {"start": 0,"records": 20,"page": 1},"artists": {{"artist": "R. Kelly","songs": 3,"artist_s": "r-kelly"},{"artist": "Ra","songs": 2,"artist_s": "ra"},{"artist": "Ra Ra Riot","songs": 2,"artist_s": "ra-ra-riot"},"..."}}}, summary="List of artists"), @OA\Examples(example="Error", value={"status": "error", "error": {"message": "No artist found" }}, summary="No artist with name starting with provided letter") ) ) ) )

Return values
mixed

listRoute()

public listRoute(mixed $request, mixed $response, mixed $args) : mixed
Parameters
$request : mixed
$response : mixed
$args : mixed
Tags
OA\Post

( path="/{game_route}/artists/list", summary="Returns artist data", description="A list of all artists", operationId="artistsListRoute", tags={"Artists"}, @OA\Parameter( ref="#/components/parameters/game_route" ), @OA\Response( response=200, description="OK", @OA\JsonContent( type="object", @OA\Property(
property="status", ref="#/components/schemas/RGWRequestStatus" ), @OA\Property( property="data", type="object", @OA\Property( property="artists", ref="#/components/schemas/Artist" ), @OA\Property( property="pagination", ref="#/components/schemas/RGWResponsePagination" ), @OA\Property( property="records", ref="#/components/schemas/RGWResponseCount" ) ), @OA\Examples(example="Success", value={"status": "success","data": {"records": {"total_available": 7538,"total_filtered": 7538,"returned": 20},"pagination": {"start": 0,"records": "20","page": 1},"artists": {{"id": "10-year-old-nolan","name": "10 Year Old Nolan","songs": 1},{"id": "10-years","name": "10 Years","songs": 5},{"id": "100-gecs","name": "100 gecs","songs": 14},"..."}}}, summary="List of artists"), @OA\Examples(example="Error, no artist found", value={"status": "error", "error": {"message": "No artist found" }}, summary="No artist found"), @OA\Examples(example="Error, invalid parameter", value={"status": "error", "error": {"message": "Parameter 'text' is not accepted at this path" }}, summary="Invalid parameter sent") ) ) )

Return values
mixed

searchRoute()

public searchRoute(mixed $request, mixed $response, mixed $args) : mixed
Parameters
$request : mixed
$response : mixed
$args : mixed
Tags
OA\Post

( path="/{game_route}/artists/search/{search_mode}", summary="Returns artist data based on a text search", description="A list of artists matching the text provided", operationId="artistsSearchRoute", tags={"Artists"}, @OA\Parameter( ref="#/components/parameters/search_mode" ), @OA\Parameter( ref="#/components/parameters/game_route" ), @OA\Parameter( description="Text to search for. Needs to be at least 3 characters long. In standard mode an error is returned if the string is shorter than 3 characters. In live mode the route fails silently if the string is shorter than 3 characters.", name="text", in="query", required=true, @OA\Schema(type="string"), @OA\Examples(example="Queen", value="queen", summary="Search for artists with 'queen' in the name"), ), @OA\Response( response=200, description="OK", @OA\JsonContent( type="object", @OA\Property(
property="status", ref="#/components/schemas/RGWRequestStatus" ), @OA\Property( property="data", ref="#/components/schemas/Artist" ), @OA\Examples(example="Success", value={"status": "success","data": {"records": {"total_available": 7538,"total_filtered": 12,"returned": 5},"pagination": {"start": "5","records": "5","page": 2},"artists": {{"artist": "Queen + Paul Rodgers","songs": 1,"artist_s": "queen-paul-rodgers"},{"artist": "Queen Sarah Saturday","songs": 1,"artist_s": "queen-sarah-saturday"},{"artist": "Queens of the Stone Age","songs": 49,"artist_s": "queens-of-the-stone-age"},"..."}}}, summary="Artists found"), @OA\Examples(example="Error", value={"status": "error", "error": {"message": "No artist found" }}, summary="No artist found") ) ) ) )

Return values
mixed

Search results