Example #1
0
 private void GetAny(TweetMedia item)
 {
     if (item.IsGIF)
     {
         AnyGIFs = true;
     }
     else if (item.IsImage)
     {
         AnyImages = true;
     }
     else if (item.IsVideo)
     {
         AnyVideos = true;
     }
     else if (item.IsUnknown)
     {
         AnyUnknownMedia = true;
     }
     else
     {
         throw new Exception("unexpected missing media type");
     }
 }
Example #2
0
 public TweetMedia(TwitterMediaDTO dto) : this(dto.MediaKey, TweetMedia.Parse(dto))
 {
 }
Example #3
0
        }                                                            // v2 remove?


        public Tweet(TwitterTweetDTO dto) : this(dto.Id, dto.Text, TweetMedia.From(dto.Includes?.Media))
        {
        }
Example #4
0
 public static Tweet From(TwitterTweetDTO dto)
 {
     return(new Tweet(dto.Text, dto.Id, TweetMedia.From(dto.Includes.Media)));
 }