Beispiel #1
0
 private static TimelineResponse ToTimelineResponse(CollectionsApiResult res)
 {
     var timeline = GetTimeline(res.Objects, res.Response.TimelineId) as TimelineResponse;
     timeline.RateLimit = res.RateLimit;
     timeline.Json = res.Json;
     return timeline;
 }
Beispiel #2
0
        private static TimelineResponse ToTimelineResponse(CollectionsApiResult res)
        {
            var timeline = GetTimeline(res.Objects, res.Response.TimelineId) as TimelineResponse;

            timeline.RateLimit = res.RateLimit;
            timeline.Json      = res.Json;
            return(timeline);
        }
Beispiel #3
0
 private static CollectionsListResult ToCollectionsListResult(CollectionsApiResult res)
 {
     return(new CollectionsListResult
     {
         Results = res.Response.Results.ConvertAll(x => GetTimeline(res.Objects, x.TimelineId)),
         Cursors = res.Response.Cursors,
         RateLimit = res.RateLimit,
         Json = res.Json
     });
 }
Beispiel #4
0
 private static CollectionsListResult ToCollectionsListResult(CollectionsApiResult res)
 {
     return new CollectionsListResult
     {
         Results = res.Response.Results.ConvertAll(x => GetTimeline(res.Objects, x.TimelineId)),
         Cursors = res.Response.Cursors,
         RateLimit = res.RateLimit,
         Json = res.Json
     };
 }
Beispiel #5
0
 private static CollectionEntriesResult ToCollectionEntriesResult(CollectionsApiResult res)
 {
     return(new CollectionEntriesResult
     {
         Entries = res.Response.Timeline.ConvertAll(x =>
         {
             var tweet = res.Objects.Tweets[x.Tweet.Id];
             tweet.User = res.Objects.Users[tweet.User.Id.Value.ToString("D")];
             return new TimelineEntry
             {
                 FeatureContext = x.FeatureContext,
                 Tweet = tweet,
                 SortIndex = long.Parse(x.Tweet.SortIndex, NumberFormatInfo.InvariantInfo)
             };
         }),
         Timeline = GetTimeline(res.Objects, res.Response.TimelineId),
         Position = res.Response.Position,
         RateLimit = res.RateLimit,
         Json = res.Json
     });
 }
Beispiel #6
0
 private static CollectionEntriesResult ToCollectionEntriesResult(CollectionsApiResult res)
 {
     return new CollectionEntriesResult
     {
         Entries = res.Response.Timeline.ConvertAll(x =>
         {
             var tweet = res.Objects.Tweets[x.Tweet.Id];
             tweet.User = res.Objects.Users[tweet.User.Id.Value.ToString("D")];
             return new TimelineEntry
             {
                 FeatureContext = x.FeatureContext,
                 Tweet = tweet,
                 SortIndex = long.Parse(x.Tweet.SortIndex, NumberFormatInfo.InvariantInfo)
             };
         }),
         Timeline = GetTimeline(res.Objects, res.Response.TimelineId),
         Position = res.Response.Position,
         RateLimit = res.RateLimit,
         Json = res.Json
     };
 }