File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 2424import Controller .PlaylistController .Playlist ;
2525import Controller .PlaylistController .PlaylistItems .BasePlaylistItems ;
2626import Controller .PlaylistController .SnapshotId ;
27+ import Controller .ShowController .MultipleShows .Show ;
2728import Model .*;
2829import com .google .gson .internal .GsonBuildConfig ;
2930import getRequests .AlbumInterface ;
@@ -1559,6 +1560,25 @@ public Controller.ShowController.MultipleShows.BaseShow getMultipleShows(Spotify
15591560
15601561 }
15611562
1563+ public Show getSpecificShow (SpotifyClient client ) throws IOException {
1564+
1565+ String url = baseUrl + String .format ("/v1/shows/%s/" ,client .getShow ().getShowIds ().get (0 ));
1566+
1567+ Retrofit retrofit = new Retrofit .Builder ()
1568+ .baseUrl (url )
1569+ .addConverterFactory (GsonConverterFactory .create ())
1570+ .build ();
1571+
1572+ showInterface showInterface = retrofit .create (Model .showInterface .class );
1573+
1574+ Call <Show > call = showInterface .getASpecificShow (getTokenString (client .getToken ()),client .getShow ().getShowIds ().get (0 ));
1575+
1576+ Response <Show > response = call .execute ();
1577+
1578+ return response .body ();
1579+
1580+ }
1581+
15621582
15631583
15641584
Original file line number Diff line number Diff line change 11package Model ;
22
33import Controller .ShowController .MultipleShows .BaseShow ;
4+ import Controller .ShowController .MultipleShows .Show ;
45import retrofit2 .Call ;
56import retrofit2 .http .GET ;
67import retrofit2 .http .Header ;
@@ -11,4 +12,7 @@ public interface showInterface {
1112 @ GET ("https://api.spotify.com/v1/shows" )
1213 Call <BaseShow > getMultipleShows (@ Header ("Authorization" ) String auth , @ Query ("ids" ) String ids );
1314
15+ @ GET ("https://api.spotify.com/v1/shows/{id}" )
16+ Call <Show > getASpecificShow (@ Header ("Authorization" ) String auth , @ Query ("id" ) String showId );
17+
1418}
You can’t perform that action at this time.
0 commit comments