Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
spotify
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web
spotify
Merge requests
!53
Resolve "Catch SpotifyWebAPIException"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Catch SpotifyWebAPIException"
59-catch-spotifywebapiexception
into
master
Overview
0
Commits
1
Pipelines
0
Changes
8
Merged
Benoît Harrault
requested to merge
59-catch-spotifywebapiexception
into
master
1 year ago
Overview
0
Commits
1
Pipelines
0
Changes
8
Expand
Closes
#59 (closed)
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
4587f67b
1 commit,
1 year ago
8 files
+
818
−
913
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
8
Search (e.g. *.vue) (Ctrl+P)
src/Controller/ArtistController.php
+
3
−
6
Options
@@ -4,15 +4,14 @@ namespace App\Controller;
use
App\Service\SpotifyApiService
;
use
App\Service\SpotifyPlaylistService
;
use
SpotifyWebAPI\SpotifyWebAPI
;
use
Symfony\Bundle\FrameworkBundle\Controller\AbstractController
;
use
Symfony\Component\HttpFoundation\JsonResponse
;
use
Symfony\Component\HttpFoundation\Response
;
use
Symfony\Component\Routing\Annotation\Route
;
class
ArtistController
extends
AbstractController
{
/** @var SpotifyWebAPI */
private
$spotifyApi
;
private
SpotifyWebAPI
$spotifyApi
;
public
function
__construct
(
SpotifyApiService
$spotifyApiService
)
{
@@ -24,10 +23,8 @@ class ArtistController extends AbstractController
/**
* @Route("/artists/top", name="get-artists-top")
*
* @return Response
*/
public
function
getArtists
():
Response
public
function
getArtists
():
Json
Response
{
$rawTopArtists
=
$this
->
spotifyApi
->
getMyTop
(
'artists'
,
Loading