예제 #1
0
 internal User(int userId, ISoundCloudApiInternal soundCloudApi)
     : base(soundCloudApi)
 {
     _soundCloudApi   = soundCloudApi;
     Request.Resource = string.Format(Uri.Users + "{{{0}}}", UrlParameter.Id);
     Request.AddParameter(UrlParameter.Id, userId, ParameterType.UrlSegment);
 }
 internal Contribution(RestRequest request, int contributionId, ISoundCloudApiInternal soundCloudApi)
     : base(soundCloudApi)
 {
     Request          = request;
     Request.Resource = Request.Resource + string.Format(Uri.Contributions + "{{{0}}}", UrlParameter.Id);
     Request.AddParameter(UrlParameter.Id, contributionId, ParameterType.UrlSegment);
 }
예제 #3
0
 internal Following(RestRequest request, int followingId, ISoundCloudApiInternal soundCloudApi)
     : base(soundCloudApi)
 {
     Request          = request;
     Request.Resource = Request.Resource + string.Format(Uri.Followings + "{{{0}}}", UrlParameter.followingId);
     Request.AddParameter(UrlParameter.followingId, followingId, ParameterType.UrlSegment);
 }
예제 #4
0
 internal Group(int groupId, ISoundCloudApiInternal soundCloudApi)
     : base(soundCloudApi)
 {
     _soundCloudApi   = soundCloudApi;
     Request.Resource = Request.Resource + string.Format(Uri.Groups + "{{{0}}}", UrlParameter.Id);
     Request.AddParameter(UrlParameter.Id, groupId, ParameterType.UrlSegment);
 }
 public PendingTrack(RestRequest request, int trackId, ISoundCloudApiInternal soundCloudApi)
     : base(soundCloudApi)
 {
     Request          = request;
     Request.Resource = string.Format(Uri.PendingTracks + "{{{0}}}", UrlParameter.Id);
     Request.AddParameter(UrlParameter.Id, trackId, ParameterType.UrlSegment);
 }
예제 #6
0
 internal WebProfile(RestRequest request, int webProfileId, ISoundCloudApiInternal soundCloudApi)
     : base(soundCloudApi)
 {
     Request          = request;
     Request.Resource = Request.Resource + string.Format(Uri.WebProfiles + "{{{0}}}", UrlParameter.Id);
     Request.AddParameter(UrlParameter.Id, webProfileId, ParameterType.UrlSegment);
 }
예제 #7
0
        internal OAuth2Token(OAuth2 oAuth2, ISoundCloudApiInternal soundCloudApi) : base(soundCloudApi)
        {
            Request.Resource = "/oauth2/token";
            Request.Method   = Method.POST;
            Request.AddParameter(FormParameter.ClientId, oAuth2.ClientId);
            Request.AddParameter(FormParameter.ClientSecret, oAuth2.ClientSecret);
            Request.AddParameter(FormParameter.GrantType, oAuth2.GrantType.ToString());

            switch (oAuth2.GrantType)
            {
            case GrantType.password:
                AddPasswordParameters(oAuth2);
                break;

            case GrantType.authorization_code:
                AddAuthorizationCodeParameters(oAuth2);
                break;

            case GrantType.refresh_token:
                AddRefreshTokenParameters(oAuth2);
                break;
            }
        }
예제 #8
0
 internal Users(ISoundCloudApiInternal soundCloudApi)
     : base(soundCloudApi)
 {
     Request.Resource = Uri.Users;
 }
예제 #9
0
 internal Users(RestRequest request, ISoundCloudApiInternal soundCloudApi)
     : base(soundCloudApi)
 {
     Request          = request;
     Request.Resource = Request.Resource + Uri.Users;
 }
예제 #10
0
 internal Activities(RestRequest request, ISoundCloudApiInternal soundCloudApi) : base(soundCloudApi)
 {
     _soundCloudApi   = soundCloudApi;
     Request          = request;
     Request.Resource = Request.Resource + Uri.Activities;
 }
예제 #11
0
 internal WebProfiles(RestRequest request, ISoundCloudApiInternal soundCloudApi) : base(soundCloudApi)
 {
     Request          = request;
     Request.Resource = Request.Resource + Uri.WebProfiles;
 }
 protected ResourceBase(ISoundCloudApiInternal soundCloudApi)
 {
     Request.RequestFormat  = DataFormat.Json;
     Request.JsonSerializer = new SoundCloudJsonSerializer();
     _soundCloudApi         = soundCloudApi;
 }
 internal SharedToEmails(RestRequest request, ISoundCloudApiInternal soundCloudApi) : base(soundCloudApi)
 {
     Request          = request;
     Request.Resource = Request.Resource + Uri.SharedToEmails;
 }
예제 #14
0
 internal Playlists(ISoundCloudApiInternal soundCloudApi)
     : base(soundCloudApi)
 {
     Request.Resource = Uri.Playlists;
 }
예제 #15
0
 internal AllOwn(RestRequest request, ISoundCloudApiInternal soundCloudApi) : base(soundCloudApi)
 {
     Request          = request;
     Request.Resource = Request.Resource + Uri.AllOwn;
 }
예제 #16
0
 internal Favorite(RestRequest request, int userId, ISoundCloudApiInternal soundCloudApi) : base(soundCloudApi)
 {
     Request          = request;
     Request.Resource = Request.Resource + string.Format(Uri.Favorites + "{{{0}}}", UrlParameter.Id);
     Request.AddParameter(UrlParameter.Id, userId, ParameterType.UrlSegment);
 }
 internal TracksAfiliated(RestRequest request, ISoundCloudApiInternal soundCloudApiInternal) : base(soundCloudApiInternal)
 {
     Request          = request;
     Request.Resource = Request.Resource + Uri.TracksAfiliated;
 }
예제 #18
0
 internal Me(ISoundCloudApiInternal soundCloudApi) : base(soundCloudApi)
 {
     _soundCloudApi   = soundCloudApi;
     Request.Resource = Uri.Me;
 }
예제 #19
0
 internal Connections(RestRequest request, ISoundCloudApiInternal soundCloudApi) : base(soundCloudApi)
 {
     Request          = request;
     Request.Resource = Request.Resource + Uri.Connections;
 }
예제 #20
0
 public Apps(ISoundCloudApiInternal soundCloudApi) : base(soundCloudApi)
 {
     Request.Resource = Uri.Apps;
 }
예제 #21
0
 internal Tracks(ISoundCloudApiInternal soundCloudApi)
     : base(soundCloudApi)
 {
     Request.Resource = Uri.Tracks;
 }
예제 #22
0
 internal Comment(int commentId, ISoundCloudApiInternal soundCloudApi)
     : base(soundCloudApi)
 {
     Request.Resource = Request.Resource + string.Format(Uri.Comments + "{{{0}}}", UrlParameter.Id);
     Request.AddParameter(UrlParameter.Id, commentId, ParameterType.UrlSegment);
 }
 internal PendingTracks(RestRequest request, ISoundCloudApiInternal soundCloudApi)
     : base(soundCloudApi)
 {
     Request          = request;
     Request.Resource = Request.Resource + Uri.PendingTracks;
 }
예제 #24
0
 internal Groups(RestRequest request, ISoundCloudApiInternal soundCloudApi) : base(soundCloudApi)
 {
     Request          = request;
     Request.Resource = Request.Resource + Uri.Groups;
 }
예제 #25
0
 internal Groups(ISoundCloudApiInternal soundCloudApi)
     : base(soundCloudApi)
 {
     Request.Resource = Uri.Groups;
 }
 internal Contributors(RestRequest request, ISoundCloudApiInternal soundCloudApi)
     : base(soundCloudApi)
 {
     Request          = request;
     Request.Resource = Request.Resource + Uri.Contributors;
 }
예제 #27
0
 public Playlist(int playlistId, ISoundCloudApiInternal soundCloudApi) : base(soundCloudApi)
 {
     _soundCloudApi   = soundCloudApi;
     Request.Resource = string.Format(Uri.Playlists + "{{{0}}}", UrlParameter.Id);
     Request.AddParameter(UrlParameter.Id, playlistId, ParameterType.UrlSegment);
 }
예제 #28
0
 internal Followings(RestRequest request, ISoundCloudApiInternal soundCloudApi) : base(soundCloudApi)
 {
     Request          = request;
     Request.Resource = Request.Resource + Uri.Followings;
 }
예제 #29
0
 public Track(int trackId, ISoundCloudApiInternal soundCloudApi) : base(soundCloudApi)
 {
     _soundCloudApi   = soundCloudApi;
     Request.Resource = string.Format(Uri.Tracks + "{{{0}}}", UrlParameter.Id);
     Request.AddParameter(UrlParameter.Id, trackId, ParameterType.UrlSegment);
 }
예제 #30
0
 internal Playlists(RestRequest request, ISoundCloudApiInternal soundCloudApi) : base(soundCloudApi)
 {
     Request          = request;
     Request.Resource = Request.Resource + Uri.Playlists;
 }