Ejemplo n.º 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)));
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 3
0
        internal CommentApi(string commentId, ISoundCloudRawClient soundCloudRawClient, ICommentConverter commentConverter)
        {
            this.soundCloudRawClient = soundCloudRawClient;
            this.commentConverter    = commentConverter;

            prefix = string.Format("comments/{0}", commentId);
        }
Ejemplo n.º 4
0
 internal ExploreApi(ISoundCloudRawClient soundCloudRawClient, IPaginationValidator paginationValidator, IExploreCategoryConverter exploreCategoryConverter, ITrackConverter trackConverter)
 {
     this.soundCloudRawClient = soundCloudRawClient;
     this.paginationValidator = paginationValidator;
     this.exploreCategoryConverter = exploreCategoryConverter;
     this.trackConverter = trackConverter;
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 7
0
 internal TracksApi(ISoundCloudRawClient soundCloudRawClient, IPaginationValidator paginationValidator, ITrackConverter trackConverter, ISearchParametersBuilder searchParametersBuilder)
 {
     this.soundCloudRawClient     = soundCloudRawClient;
     this.paginationValidator     = paginationValidator;
     this.trackConverter          = trackConverter;
     this.searchParametersBuilder = searchParametersBuilder;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 10
0
        internal CommentApi(string commentId, ISoundCloudRawClient soundCloudRawClient, ICommentConverter commentConverter)
        {
            this.soundCloudRawClient = soundCloudRawClient;
            this.commentConverter = commentConverter;

            prefix = string.Format("comments/{0}", commentId);
        }
Ejemplo n.º 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;
     });
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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));
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 24
0
 internal UsersApi(ISoundCloudRawClient soundCloudRawClient, IPaginationValidator paginationValidator, IUserConverter userConverter)
 {
     this.soundCloudRawClient = soundCloudRawClient;
     this.paginationValidator = paginationValidator;
     this.userConverter       = userConverter;
 }
Ejemplo n.º 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));
        }
Ejemplo n.º 27
0
 internal OEmbed(ISoundCloudRawClient soundCloudRawClient)
 {
     this.soundCloudRawClient = soundCloudRawClient;
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 33
0
 internal UsersApi(ISoundCloudRawClient soundCloudRawClient, IPaginationValidator paginationValidator, IUserConverter userConverter)
 {
     this.soundCloudRawClient = soundCloudRawClient;
     this.paginationValidator = paginationValidator;
     this.userConverter = userConverter;
 }
Ejemplo n.º 34
0
 public IUnauthorizedSoundCloudClient CreateUnauthorized(ISoundCloudRawClient soundCloudRawClient)
 {
     return(new UnauthorizedSoundCloudClient(subresourceFactoryBuilder.CreateSubresourceFactory(soundCloudRawClient)));
 }
Ejemplo n.º 35
0
 internal GroupsApi(ISoundCloudRawClient soundCloudRawClient, IPaginationValidator paginationValidator, IGroupConverter groupConverter)
 {
     this.soundCloudRawClient = soundCloudRawClient;
     this.paginationValidator = paginationValidator;
     this.groupConverter = groupConverter;
 }
Ejemplo n.º 36
0
 internal AuthApi(ISoundCloudRawClient soundCloudRawClient, IAccessTokenConverter accessTokenConverter)
 {
     this.soundCloudRawClient = soundCloudRawClient;
     this.accessTokenConverter = accessTokenConverter;
 }
Ejemplo n.º 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()));
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 41
0
 internal OEmbed(ISoundCloudRawClient soundCloudRawClient)
 {
     this.soundCloudRawClient = soundCloudRawClient;
 }