Пример #1
0
 public Uri GetRequestTokenUri(string redirectUri, SCResponseType responseType, SCScope scope, SCDisplay display, string state)
 {
     return soundCloudRawClient.BuildUri("connect",
                                         new Dictionary<string, object>
                                         {
                                             {"client_id", soundCloudRawClient.Credentials.ClientId},
                                             {"redirect_uri", redirectUri},
                                             {"response_type", responseType.GetParameterName()},
                                             {"scope", scope.GetParameterName()},
                                             {"display", display.GetParameterName()},
                                             {"state", state}
                                         }, string.Empty);
 }
        public Uri GetRequestTokenUri(string clientId, string redirectUri, SCResponseType responseType, SCScope scope, SCDisplay display, string state)
        {
            var credentials = new SCCredentials
            {
                ClientId = clientId
            };

            var soundCloudRawClient = soundCloudRawClientFactory.Create(credentials);
            IAuthApi authApi = CreateAuthApi(soundCloudRawClient);
            var requestTokenUri = authApi.GetRequestTokenUri(redirectUri, responseType, scope, display, state);
            return requestTokenUri;
        }