public PlaylistEndpoint(ISpotifyHttpClient spotifyHttpClient, ILogService logService, Dictionary <ApiEndpointType, SpotifyEndpoint> apiEndpoints) { _spotifyHttpClient = spotifyHttpClient; _logService = logService; _mapper = new SpotifyToSpotibroModelMapper(); _apiEndpoints = apiEndpoints; }
public PartyService(IPartyRepository partyRepository, ISpotifyHttpClient spotifyHttpClient, ILogService logService, IPartyGoerService partyGoerService) { _partyRepository = partyRepository; _spotifyHttpClient = spotifyHttpClient; _partyGoerService = partyGoerService; _logService = logService; }
public PartyService(IPartyRepository partyRepository, ISpotifyHttpClient spotifyHttpClient, ILogService logService) { _partyRepository = partyRepository; _spotifyHttpClient = spotifyHttpClient; _random = new Random(); _logService = logService; }
public void SetUp() { _spotifyAuthentication = new Mock <ISpotifyAuthentication>(); _httpClient = new Mock <IHttpClient>(); _logService = new Mock <ILogService>(); _spotifyHttpClient = new SpotifyHttpClient(_spotifyAuthentication.Object, _httpClient.Object, _logService.Object); }
public PartyHub(IPartyService partyService, ISpotifyHttpClient spotifyHttpClient, ILogService logService, IPartyGoerService partyGoerService) { _partyService = partyService; _spotifyHttpClient = spotifyHttpClient; _logService = logService; _partyGoerService = partyGoerService; }
public PartyGoerService(ISpotifyHttpClient spotifyHttpClient, IHttpContextAccessor httpContextAccessor, ISpotifyAuthentication spotifyAuthentication) { _spotifyHttpClient = spotifyHttpClient; _httpContextAccessor = httpContextAccessor; _spotifyAuthentication = spotifyAuthentication; _partyGoerCache = new Dictionary <string, PartyGoer>(); }
public SpotifyApi(ISpotifyHttpClient spotifyHttpClient, ILogService logService) { var apiEndpoints = new Dictionary <ApiEndpointType, SpotifyEndpoint> { { ApiEndpointType.CurrentSong, new SpotifyEndpoint { EndpointUrl = "https://api.spotify.com/v1/me/player/currently-playing", HttpMethod = HttpMethod.Get } }, { ApiEndpointType.PlaySong, new SpotifyEndpoint { EndpointUrl = "https://api.spotify.com/v1/me/player/play", HttpMethod = HttpMethod.Put } }, { ApiEndpointType.Token, new SpotifyEndpoint { EndpointUrl = "https://accounts.spotify.com/api/token", HttpMethod = HttpMethod.Post } }, { ApiEndpointType.UserInformation, new SpotifyEndpoint { EndpointUrl = "https://api.spotify.com/v1/me", HttpMethod = HttpMethod.Get } }, { ApiEndpointType.GetTopTracks, new SpotifyEndpoint { EndpointUrl = "https://api.spotify.com/v1/me/top/tracks", HttpMethod = HttpMethod.Get } }, { ApiEndpointType.GetRecommendedTracks, new SpotifyEndpoint { EndpointUrl = "https://api.spotify.com/v1/recommendations", HttpMethod = HttpMethod.Get } }, { ApiEndpointType.GetUserDevices, new SpotifyEndpoint { EndpointUrl = "https://api.spotify.com/v1/me/player/devices", HttpMethod = HttpMethod.Get } }, { ApiEndpointType.SearchSpotify, new SpotifyEndpoint { EndpointUrl = "https://api.spotify.com/v1/search", HttpMethod = HttpMethod.Get } }, { ApiEndpointType.PausePlayback, new SpotifyEndpoint { EndpointUrl = "https://api.spotify.com/v1/me/player/pause", HttpMethod = HttpMethod.Put } }, { ApiEndpointType.GetUserPlaylists, new SpotifyEndpoint { EndpointUrl = "https://api.spotify.com/v1/me/playlists", HttpMethod = HttpMethod.Get } }, { ApiEndpointType.GetPlaylistItems, new SpotifyEndpoint { EndpointUrl = "https://api.spotify.com/v1/playlists/{playlist_id}/tracks", HttpMethod = HttpMethod.Get, Keys = new List <string> { "{playlist_id}" } } }, { ApiEndpointType.ArtistInformation, new SpotifyEndpoint { EndpointUrl = "https://api.spotify.com/v1/artists/{id}", HttpMethod = HttpMethod.Get, Keys = new List <string> { "{id}" } } }, { ApiEndpointType.ArtistTopTracks, new SpotifyEndpoint { EndpointUrl = "https://api.spotify.com/v1/artists/{id}/top-tracks", HttpMethod = HttpMethod.Get, Keys = new List <string> { "{id}" } } }, { ApiEndpointType.UsersTopArtists, new SpotifyEndpoint { EndpointUrl = "https://api.spotify.com/v1/me/top/artists", HttpMethod = HttpMethod.Get } } }; _playlistEndpoint = new PlaylistEndpoint(spotifyHttpClient, logService, apiEndpoints); _personalizationEndpoint = new PersonalizationEndpoint(spotifyHttpClient, logService, apiEndpoints); }
public PartyHandler(ISpotifyHttpClient spotifyHttpClient, IHubContext<PartyHub> partyHubContext, ILogService logService, IPartyService partyService, IPartyGoerService partyGoerService) { _logService = logService; _partyHubContext = partyHubContext; _spotifyHttpClient = spotifyHttpClient; _partyService = partyService; _partyGoerService = partyGoerService; }
public PartyGoerService(ISpotifyHttpClient spotifyHttpClient, IHttpContextAccessor httpContextAccessor, ISpotifyAuthentication spotifyAuthentication, ILogService logService, ISpotifyApi spotifyApi, IUserRepository userRepository) { _spotifyHttpClient = spotifyHttpClient; _httpContextAccessor = httpContextAccessor; _spotifyAuthentication = spotifyAuthentication; _partyGoerCache = new ConcurrentDictionary <string, PartyGoer>(); _logService = logService; _spotifyApi = spotifyApi; _userRepository = userRepository; _userIds = new Dictionary <string, int>(); _randomLock = new object(); _random = new Random(); }
public AuthenticationService(ISpotifyHttpClient spotifyHttpClient, ISpotifyAuthentication spotifyAuthentication) { _spotifyHttpClient = spotifyHttpClient; _spotifyAuthentication = spotifyAuthentication; }
public BrowseSpotifyService(ISpotifyHttpClient spotifyHttpClient, ILogService logService) { _spotifyHttpClient = spotifyHttpClient; _logService = logService; }
public AuthenticationService(ISpotifyHttpClient spotifyHttpClient, ISpotifyAuthentication spotifyAuthentication, IPartyGoerService partyGoerService) { _spotifyHttpClient = spotifyHttpClient; _spotifyAuthentication = spotifyAuthentication; _partyGoerService = partyGoerService; }
public ContextData(ISpotifyHttpClient spotifyHttpClient, IOptionsProvider <FluentSpotifyClientOptions> fluentSpotifyClientOptionsProvider) { this.SpotifyHttpClient = spotifyHttpClient; this.FluentSpotifyClientOptionsProvider = fluentSpotifyClientOptionsProvider; }
public FluentSpotifyClient(ISpotifyHttpClient spotifyHttpClient, IOptionsProvider <FluentSpotifyClientOptions> fluentSpotifyClientOptionsProvider) { this.contextData = new ContextData(spotifyHttpClient, fluentSpotifyClientOptionsProvider); this.spotifyHttpClient = spotifyHttpClient; }
public PartyGoerService(ISpotifyHttpClient spotifyHttpClient) { _spotifyHttpClient = spotifyHttpClient; }