コード例 #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)));
 }
コード例 #2
0
 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;
 }
コード例 #5
0
 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;
 }
コード例 #12
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;
 }
コード例 #13
0
 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);
        }
コード例 #17
0
 public ISubresourceFactory CreateSubresourceFactory(ISoundCloudRawClient soundCloudRawClient)
 {
     return new SubresourceFactory(
         soundCloudRawClient, 
         paginationValidator, 
         trackConverter, 
         userConverter, 
         playlistConverter, 
         commentConverter, 
         groupConverter, 
         webProfileConverter, 
         connectionConverter, 
         activityResultConverter, 
         applicationConverter);
 }
コード例 #18
0
 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;
 }
コード例 #29
0
 private static AuthApi CreateAuthApi(ISoundCloudRawClient soundCloudRawClient)
 {
     return new AuthApi(soundCloudRawClient, new AccessTokenConverter());
 }
コード例 #30
0
 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)));
 }
コード例 #32
0
 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;
 }
コード例 #38
0
 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;
 }
コード例 #40
0
 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;
 }