GeeklistSharp.Service.GeeklistService.AuthenticateWith C# (CSharp) Méthode

AuthenticateWith() public méthode

public AuthenticateWith ( string token, string tokenSecret ) : void
token string
tokenSecret string
Résultat void
        public void AuthenticateWith(string token, string tokenSecret)
        {
            api.Token = token;
            api.TokenSecret = tokenSecret;
        }

Usage Example

        private GeeklistService GetAuthenticatedService()
        {
            string consumerKey = TestConstants.OAUTH_CONSUMER_KEY; // TODO: Initialize to an appropriate value
            string consumerSecret = TestConstants.OAUTH_CONSUMER_SECRET; // TODO: Initialize to an appropriate value
            string token = TestConstants.TOKEN; // TODO: Initialize to an appropriate value
            string tokenSecret = TestConstants.TOKEN_SECRET; // TODO: Initialize to an appropriate value
            GeeklistService service = new GeeklistService(consumerKey, consumerSecret);

            OAuthAccessToken accessToken = new OAuthAccessToken { Token = token, TokenSecret = tokenSecret };

            service.AuthenticateWith(accessToken.Token, accessToken.TokenSecret);
            return service;
        }
All Usage Examples Of GeeklistSharp.Service.GeeklistService::AuthenticateWith