예제 #1
0
 internal static TCollection GetCollectionBatch <TCollection, TResponse>(
     this ISoundCloudRawClient soundCloudRawClient, IPaginationValidator paginationValidator, string prefix, string command, int offset, int limit)
     where TCollection : class, IEntityCollection <TResponse>
 {
     paginationValidator.Validate(offset, limit);
     return(soundCloudRawClient.Request <TCollection>(prefix, command, HttpMethod.Get, new Dictionary <string, object>().SetPagination(offset, limit)));
 }
 internal PlaylistApi(string playlistId, ISoundCloudRawClient soundCloudRawClient, IPlaylistConverter playlistConverter)
 {
     this.playlistId = playlistId;
     this.soundCloudRawClient = soundCloudRawClient;
     this.playlistConverter = playlistConverter;
     prefix = string.Format("playlists/{0}", playlistId);
 }
예제 #3
0
        internal CommentApi(string commentId, ISoundCloudRawClient soundCloudRawClient, ICommentConverter commentConverter)
        {
            this.soundCloudRawClient = soundCloudRawClient;
            this.commentConverter    = commentConverter;

            prefix = string.Format("comments/{0}", commentId);
        }
예제 #4
0
 internal ExploreApi(ISoundCloudRawClient soundCloudRawClient, IPaginationValidator paginationValidator, IExploreCategoryConverter exploreCategoryConverter, ITrackConverter trackConverter)
 {
     this.soundCloudRawClient = soundCloudRawClient;
     this.paginationValidator = paginationValidator;
     this.exploreCategoryConverter = exploreCategoryConverter;
     this.trackConverter = trackConverter;
 }
 internal PlaylistApi(string playlistId, ISoundCloudRawClient soundCloudRawClient, IPlaylistConverter playlistConverter)
 {
     this.playlistId          = playlistId;
     this.soundCloudRawClient = soundCloudRawClient;
     this.playlistConverter   = playlistConverter;
     prefix = string.Format("playlists/{0}", playlistId);
 }
예제 #6
0
 public SubresourceFactory(
     ISoundCloudRawClient soundCloudRawClient,
     IPaginationValidator paginationValidator,
     ITrackConverter trackConverter,
     IUserConverter userConverter,
     IPlaylistConverter playlistConverter,
     ICommentConverter commentConverter,
     IGroupConverter groupConverter,
     IWebProfileConverter webProfileConverter,
     IConnectionConverter connectionConverter,
     IActivityResultConverter activityResultConverter,
     IApplicationConverter applicationConverter,
     IExploreCategoryConverter exploreCategoryConverter)
 {
     this.soundCloudRawClient      = soundCloudRawClient;
     this.paginationValidator      = paginationValidator;
     this.trackConverter           = trackConverter;
     this.userConverter            = userConverter;
     this.playlistConverter        = playlistConverter;
     this.commentConverter         = commentConverter;
     this.groupConverter           = groupConverter;
     this.webProfileConverter      = webProfileConverter;
     this.connectionConverter      = connectionConverter;
     this.activityResultConverter  = activityResultConverter;
     this.applicationConverter     = applicationConverter;
     this.exploreCategoryConverter = exploreCategoryConverter;
 }
예제 #7
0
 internal TracksApi(ISoundCloudRawClient soundCloudRawClient, IPaginationValidator paginationValidator, ITrackConverter trackConverter, ISearchParametersBuilder searchParametersBuilder)
 {
     this.soundCloudRawClient     = soundCloudRawClient;
     this.paginationValidator     = paginationValidator;
     this.trackConverter          = trackConverter;
     this.searchParametersBuilder = searchParametersBuilder;
 }
예제 #8
0
 internal MeApi(
     ISoundCloudRawClient soundCloudRawClient, 
     IPaginationValidator paginationValidator, 
     IUserConverter userConverter, 
     ITrackConverter trackConverter, 
     IPlaylistConverter playlistConverter, 
     ICommentConverter commentConverter, 
     IGroupConverter groupConverter, 
     IWebProfileConverter webProfileConverter,
     IConnectionConverter connectionConverter,
     IActivityResultConverter activityResultConverter)
     : base(
         null, 
         soundCloudRawClient, 
         paginationValidator, 
         userConverter, 
         trackConverter, 
         playlistConverter, 
         commentConverter, 
         groupConverter, 
         webProfileConverter,
         prefix)
 {
     this.connectionConverter = connectionConverter;
     this.activityResultConverter = activityResultConverter;
 }
예제 #9
0
 internal MeApi(
     ISoundCloudRawClient soundCloudRawClient,
     IPaginationValidator paginationValidator,
     IUserConverter userConverter,
     ITrackConverter trackConverter,
     IPlaylistConverter playlistConverter,
     ICommentConverter commentConverter,
     IGroupConverter groupConverter,
     IWebProfileConverter webProfileConverter,
     IConnectionConverter connectionConverter,
     IActivityResultConverter activityResultConverter)
     : base(
         null,
         soundCloudRawClient,
         paginationValidator,
         userConverter,
         trackConverter,
         playlistConverter,
         commentConverter,
         groupConverter,
         webProfileConverter,
         prefix)
 {
     this.connectionConverter     = connectionConverter;
     this.activityResultConverter = activityResultConverter;
 }
예제 #10
0
        internal CommentApi(string commentId, ISoundCloudRawClient soundCloudRawClient, ICommentConverter commentConverter)
        {
            this.soundCloudRawClient = soundCloudRawClient;
            this.commentConverter = commentConverter;

            prefix = string.Format("comments/{0}", commentId);
        }
예제 #11
0
 internal ExploreApi(ISoundCloudRawClient soundCloudRawClient, IPaginationValidator paginationValidator, IExploreCategoryConverter exploreCategoryConverter, ITrackConverter trackConverter)
 {
     this.soundCloudRawClient      = soundCloudRawClient;
     this.paginationValidator      = paginationValidator;
     this.exploreCategoryConverter = exploreCategoryConverter;
     this.trackConverter           = trackConverter;
 }
 public SubresourceFactory(
     ISoundCloudRawClient soundCloudRawClient,
     IPaginationValidator paginationValidator,
     ITrackConverter trackConverter,
     IUserConverter userConverter,
     IPlaylistConverter playlistConverter,
     ICommentConverter commentConverter,
     IGroupConverter groupConverter,
     IWebProfileConverter webProfileConverter,
     IConnectionConverter connectionConverter,
     IActivityResultConverter activityResultConverter,
     IApplicationConverter applicationConverter,
     IExploreCategoryConverter exploreCategoryConverter)
 {
     this.soundCloudRawClient = soundCloudRawClient;
     this.paginationValidator = paginationValidator;
     this.trackConverter = trackConverter;
     this.userConverter = userConverter;
     this.playlistConverter = playlistConverter;
     this.commentConverter = commentConverter;
     this.groupConverter = groupConverter;
     this.webProfileConverter = webProfileConverter;
     this.connectionConverter = connectionConverter;
     this.activityResultConverter = activityResultConverter;
     this.applicationConverter = applicationConverter;
     this.exploreCategoryConverter = exploreCategoryConverter;
 }
 public Func <Dictionary <string, object>, Track[]> BuildGetter(ISoundCloudRawClient soundCloudRawClient)
 {
     return(parameters =>
     {
         var tracks = soundCloudRawClient.Request <TrackCollection>(prefix, command, HttpMethod.Get, parameters, responseType: string.Empty, domain: Domain.ApiV2);
         return tracks.Collection;
     });
 }
예제 #14
0
 internal ResolveApi(
     ISoundCloudRawClient soundCloudRawClient,
     IGroupConverter groupConverter,
     IUserConverter userConverter,
     ITrackConverter trackConverter,
     IPlaylistConverter playlistConverter)
 {
     this.soundCloudRawClient = soundCloudRawClient;
     this.groupConverter      = groupConverter;
     this.userConverter       = userConverter;
     this.trackConverter      = trackConverter;
     this.playlistConverter   = playlistConverter;
 }
예제 #15
0
        internal AppApi(
            string applicationId, 
            IPaginationValidator paginationValidator, 
            ISoundCloudRawClient soundCloudRawClient, 
            IApplicationConverter applicationConverter,
            ITrackConverter trackConverter)
        {
            this.paginationValidator = paginationValidator;
            this.soundCloudRawClient = soundCloudRawClient;
            this.applicationConverter = applicationConverter;
            this.trackConverter = trackConverter;

            prefix = string.Format("apps/{0}", applicationId);
        }
예제 #16
0
        internal AppApi(
            string applicationId,
            IPaginationValidator paginationValidator,
            ISoundCloudRawClient soundCloudRawClient,
            IApplicationConverter applicationConverter,
            ITrackConverter trackConverter)
        {
            this.paginationValidator  = paginationValidator;
            this.soundCloudRawClient  = soundCloudRawClient;
            this.applicationConverter = applicationConverter;
            this.trackConverter       = trackConverter;

            prefix = string.Format("apps/{0}", applicationId);
        }
 public ISubresourceFactory CreateSubresourceFactory(ISoundCloudRawClient soundCloudRawClient)
 {
     return new SubresourceFactory(
         soundCloudRawClient, 
         paginationValidator, 
         trackConverter, 
         userConverter, 
         playlistConverter, 
         commentConverter, 
         groupConverter, 
         webProfileConverter, 
         connectionConverter, 
         activityResultConverter, 
         applicationConverter);
 }
 public ISubresourceFactory CreateSubresourceFactory(ISoundCloudRawClient soundCloudRawClient)
 {
     return(new SubresourceFactory(
                soundCloudRawClient,
                paginationValidator,
                trackConverter,
                userConverter,
                playlistConverter,
                commentConverter,
                groupConverter,
                webProfileConverter,
                connectionConverter,
                activityResultConverter,
                applicationConverter));
 }
예제 #19
0
        internal GroupApi(
            string groupId,
            ISoundCloudRawClient soundCloudRawClient,
            IPaginationValidator paginationValidator,
            IGroupConverter groupConverter,
            IUserConverter userConverter,
            ITrackConverter trackConverter)
        {
            this.soundCloudRawClient = soundCloudRawClient;
            this.paginationValidator = paginationValidator;
            this.groupConverter      = groupConverter;
            this.userConverter       = userConverter;
            this.trackConverter      = trackConverter;

            prefix = string.Format("groups/{0}", groupId);
        }
예제 #20
0
        internal TrackApi(
            string trackId,
            ISoundCloudRawClient soundCloudRawClient,
            IPaginationValidator paginationValidator,
            ITrackConverter trackConverter,
            IUserConverter userConverter,
            ICommentConverter commentConverter)
        {
            this.trackId             = trackId;
            this.soundCloudRawClient = soundCloudRawClient;
            this.paginationValidator = paginationValidator;
            this.trackConverter      = trackConverter;
            this.userConverter       = userConverter;
            this.commentConverter    = commentConverter;

            prefix = string.Format("tracks/{0}", trackId);
        }
예제 #21
0
        internal TrackApi(
            string trackId, 
            ISoundCloudRawClient soundCloudRawClient, 
            IPaginationValidator paginationValidator, 
            ITrackConverter trackConverter, 
            IUserConverter userConverter,
            ICommentConverter commentConverter)
        {
            this.trackId = trackId;
            this.soundCloudRawClient = soundCloudRawClient;
            this.paginationValidator = paginationValidator;
            this.trackConverter = trackConverter;
            this.userConverter = userConverter;
            this.commentConverter = commentConverter;

            prefix = string.Format("tracks/{0}", trackId);
        }
예제 #22
0
        internal UserApi(
            string userId, 
            ISoundCloudRawClient soundCloudRawClient, 
            IPaginationValidator paginationValidator, 
            IUserConverter userConverter, 
            ITrackConverter trackConverter, 
            IPlaylistConverter playlistConverter,
            ICommentConverter commentConverter,
            IGroupConverter groupConverter,
            IWebProfileConverter webProfileConverter,
            string customPrefix = null)
        {
            this.userId = userId;
            this.soundCloudRawClient = soundCloudRawClient;
            this.paginationValidator = paginationValidator;
            this.userConverter = userConverter;
            this.trackConverter = trackConverter;
            this.playlistConverter = playlistConverter;
            this.commentConverter = commentConverter;
            this.groupConverter = groupConverter;
            this.webProfileConverter = webProfileConverter;

            prefix = string.IsNullOrEmpty(customPrefix) ? string.Format("users/{0}", userId) : customPrefix;
        }
예제 #23
0
        internal UserApi(
            string userId,
            ISoundCloudRawClient soundCloudRawClient,
            IPaginationValidator paginationValidator,
            IUserConverter userConverter,
            ITrackConverter trackConverter,
            IPlaylistConverter playlistConverter,
            ICommentConverter commentConverter,
            IGroupConverter groupConverter,
            IWebProfileConverter webProfileConverter,
            string customPrefix = null)
        {
            this.userId = userId;
            this.soundCloudRawClient = soundCloudRawClient;
            this.paginationValidator = paginationValidator;
            this.userConverter       = userConverter;
            this.trackConverter      = trackConverter;
            this.playlistConverter   = playlistConverter;
            this.commentConverter    = commentConverter;
            this.groupConverter      = groupConverter;
            this.webProfileConverter = webProfileConverter;

            prefix = string.IsNullOrEmpty(customPrefix) ? string.Format("users/{0}", userId) : customPrefix;
        }
예제 #24
0
 internal UsersApi(ISoundCloudRawClient soundCloudRawClient, IPaginationValidator paginationValidator, IUserConverter userConverter)
 {
     this.soundCloudRawClient = soundCloudRawClient;
     this.paginationValidator = paginationValidator;
     this.userConverter       = userConverter;
 }
예제 #25
0
 internal AuthApi(ISoundCloudRawClient soundCloudRawClient, IAccessTokenConverter accessTokenConverter)
 {
     this.soundCloudRawClient  = soundCloudRawClient;
     this.accessTokenConverter = accessTokenConverter;
 }
        public Func <Dictionary <string, object>, Track[]> BuildGetter(SCApiVersion version, ISoundCloudRawClient soundCloudRawClient)
        {
            var searchParametersBuilder = searchParametersBuilders.SingleOrDefault(x => x.Version == version);

            if (searchParametersBuilder == null)
            {
                throw new NotSupportedException(string.Format("Search for version {0} not supported", version));
            }

            return(searchParametersBuilder.BuildGetter(soundCloudRawClient));
        }
예제 #27
0
 internal OEmbed(ISoundCloudRawClient soundCloudRawClient)
 {
     this.soundCloudRawClient = soundCloudRawClient;
 }
예제 #28
0
 internal TracksApi(ISoundCloudRawClient soundCloudRawClient, IPaginationValidator paginationValidator, ITrackConverter trackConverter)
 {
     this.soundCloudRawClient = soundCloudRawClient;
     this.paginationValidator = paginationValidator;
     this.trackConverter      = trackConverter;
 }
 private static AuthApi CreateAuthApi(ISoundCloudRawClient soundCloudRawClient)
 {
     return new AuthApi(soundCloudRawClient, new AccessTokenConverter());
 }
 public ISoundCloudClient Build(ISoundCloudRawClient soundCloudRawClient)
 {
     return new SoundCloudClient(soundCloudRawClient.AccessToken, subresourceFactoryBuilder.CreateSubresourceFactory(soundCloudRawClient));
 }
예제 #31
0
 public ISoundCloudClient Build(ISoundCloudRawClient soundCloudRawClient)
 {
     return(new SoundCloudClient(soundCloudRawClient.AccessToken, subresourceFactoryBuilder.CreateSubresourceFactory(soundCloudRawClient)));
 }
 public IUnauthorizedSoundCloudClient CreateUnauthorized(ISoundCloudRawClient soundCloudRawClient)
 {
     return new UnauthorizedSoundCloudClient(subresourceFactoryBuilder.CreateSubresourceFactory(soundCloudRawClient));
 }
예제 #33
0
 internal UsersApi(ISoundCloudRawClient soundCloudRawClient, IPaginationValidator paginationValidator, IUserConverter userConverter)
 {
     this.soundCloudRawClient = soundCloudRawClient;
     this.paginationValidator = paginationValidator;
     this.userConverter = userConverter;
 }
예제 #34
0
 public IUnauthorizedSoundCloudClient CreateUnauthorized(ISoundCloudRawClient soundCloudRawClient)
 {
     return(new UnauthorizedSoundCloudClient(subresourceFactoryBuilder.CreateSubresourceFactory(soundCloudRawClient)));
 }
예제 #35
0
 internal GroupsApi(ISoundCloudRawClient soundCloudRawClient, IPaginationValidator paginationValidator, IGroupConverter groupConverter)
 {
     this.soundCloudRawClient = soundCloudRawClient;
     this.paginationValidator = paginationValidator;
     this.groupConverter = groupConverter;
 }
예제 #36
0
 internal AuthApi(ISoundCloudRawClient soundCloudRawClient, IAccessTokenConverter accessTokenConverter)
 {
     this.soundCloudRawClient = soundCloudRawClient;
     this.accessTokenConverter = accessTokenConverter;
 }
예제 #37
0
 internal GroupsApi(ISoundCloudRawClient soundCloudRawClient, IPaginationValidator paginationValidator, IGroupConverter groupConverter)
 {
     this.soundCloudRawClient = soundCloudRawClient;
     this.paginationValidator = paginationValidator;
     this.groupConverter      = groupConverter;
 }
 private static AuthApi CreateAuthApi(ISoundCloudRawClient soundCloudRawClient)
 {
     return(new AuthApi(soundCloudRawClient, new AccessTokenConverter()));
 }
예제 #39
0
 internal TracksApi(ISoundCloudRawClient soundCloudRawClient, IPaginationValidator paginationValidator, ITrackConverter trackConverter)
 {
     this.soundCloudRawClient = soundCloudRawClient;
     this.paginationValidator = paginationValidator;
     this.trackConverter = trackConverter;
 }
 public Func <Dictionary <string, object>, Track[]> BuildGetter(ISoundCloudRawClient soundCloudRawClient)
 {
     return(parameters => soundCloudRawClient.Request <Track[]>(prefix, string.Empty, HttpMethod.Get, parameters));
 }
예제 #41
0
 internal OEmbed(ISoundCloudRawClient soundCloudRawClient)
 {
     this.soundCloudRawClient = soundCloudRawClient;
 }