Exemplo n.º 1
0
 protected override async Task<RateLimitDescription> Execute(CancellationToken token)
 {
     var param = new UserParameter(_accessor.Credential.Id);
     var result = await RetrieveCursoredResult(_accessor,
         (a, i) => a.GetFriendsIdsAsync(param, i, null, token), CallExceptionHandler, token)
         .ConfigureAwait(false);
     CallHandler(result.Result);
     return result.RateLimit;
 }
Exemplo n.º 2
0
 public UserInfoReceiver(ApiAccessor accessor, [NotNull] Action<TwitterUser> handler,
     [CanBeNull] Action<Exception> exceptionHandler, [NotNull] UserParameter target)
     : base(exceptionHandler)
 {
     if (handler == null) throw new ArgumentNullException(nameof(handler));
     if (target == null) throw new ArgumentNullException(nameof(target));
     _accessor = accessor;
     _handler = handler;
     _target = target;
 }
Exemplo n.º 3
0
 public UserTimelineReceiver([NotNull] ApiAccessor accessor, [NotNull] Action<TwitterStatus> handler,
     [CanBeNull] Action<Exception> exceptionHandler, [NotNull] UserParameter target, int receiveCount = 100,
     bool excludeReplies = false, bool includeRetweets = true) : base(handler, exceptionHandler)
 {
     if (accessor == null) throw new ArgumentNullException(nameof(accessor));
     if (target == null) throw new ArgumentNullException(nameof(target));
     _accessor = accessor;
     _target = target;
     _receiveCount = receiveCount;
     _excludeReplies = excludeReplies;
     _includeRetweets = includeRetweets;
 }