public TwitterOAuthClient(TwitterToken token, string endpoint, IDictionary<string, object> param = null) : base(token.Application.ConsumerKey, token.Application.ConsumerSecret, token.TokenKey, token.TokenSecret) { this.endpoint = token.Endpoints[endpoint]; var url = this.endpoint.Definition.Url; if (param != null) param.ForEach(kvp => url = url.Replace(kvp.Key, kvp.Value.ToString())); this.Url = url; this.MethodType = this.endpoint.Definition.MethodType == HttpMethod.Get ? MethodType.Get : MethodType.Post; }
public StreamingClient(TwitterToken token, string endpoint) { this.endpoint = token.Endpoints[endpoint]; this.client = new OAuthClient( token.Application.ConsumerKey, token.Application.ConsumerSecret, token.TokenKey, token.TokenSecret) { Url = this.endpoint.Definition.Url, MethodType = this.endpoint.Definition.MethodType == HttpMethod.Get ? MethodType.Get : MethodType.Post, }; var profile = TwitterClient.Current.CurrentNetworkProfile; if (profile != null) { if (profile.Proxy != null) { this.client.ApplyBeforeRequest += req => req.Proxy = profile.Proxy.GetProxy(); } } }
public StatusController() : base() { twEndpoint = new TwitterEndpoint(); }
public FriendsController() : base() { twEndpoint = new TwitterEndpoint(); }
public TweetsController() : base() { twEndpoint = new TwitterEndpoint(); }
public FavouritesController() : base() { twEndpoint = new TwitterEndpoint(); }
public TwitterTimeLineController() : base() { twEndpoint = new TwitterEndpoint(); }
public FollowersController() : base() { twEndpoint = new TwitterEndpoint(); }