This is "depercated"/a togglable option in the config (eventually) Primarly used as a fallback if we cannot lookup user info
(tweet blueskyapi.Post)
| 749 | // This is "depercated"/a togglable option in the config (eventually) |
| 750 | // Primarly used as a fallback if we cannot lookup user info |
| 751 | func GetUserInfoFromTweetData(tweet blueskyapi.Post) bridge.TwitterUser { |
| 752 | return bridge.TwitterUser{ |
| 753 | Name: func() string { |
| 754 | if tweet.Author.DisplayName == "" { |
| 755 | return tweet.Author.Handle |
| 756 | } |
| 757 | return tweet.Author.DisplayName |
| 758 | }(), |
| 759 | ProfileSidebarBorderColor: "eeeeee", |
| 760 | ProfileBackgroundTile: false, |
| 761 | ProfileSidebarFillColor: "efefef", |
| 762 | CreatedAt: bridge.TwitterTimeConverter(tweet.Author.Associated.CreatedAt.Time), |
| 763 | ProfileImageURL: configData.CdnURL + "/cdn/img/?url=" + url.QueryEscape(tweet.Author.Avatar) + ":profile_bigger", |
| 764 | ProfileImageURLHttps: configData.CdnURL + "/cdn/img/?url=" + url.QueryEscape(tweet.Author.Avatar) + ":profile_bigger", |
| 765 | Location: "Twitter", |
| 766 | ProfileLinkColor: "009999", |
| 767 | FollowRequestSent: false, |
| 768 | URL: "", |
| 769 | ScreenName: tweet.Author.Handle, |
| 770 | ContributorsEnabled: false, |
| 771 | UtcOffset: nil, |
| 772 | IsTranslator: false, |
| 773 | ID: *bridge.BlueSkyToTwitterID(tweet.URI), |
| 774 | IDStr: strconv.FormatInt(*bridge.BlueSkyToTwitterID(tweet.URI), 10), |
| 775 | ProfileUseBackgroundImage: false, |
| 776 | ProfileTextColor: "333333", |
| 777 | Protected: false, |
| 778 | Lang: "en", |
| 779 | Notifications: nil, |
| 780 | TimeZone: nil, |
| 781 | Verified: false, |
| 782 | ProfileBackgroundColor: "C0DEED", |
| 783 | GeoEnabled: true, |
| 784 | Description: "", |
| 785 | ProfileBackgroundImageURL: "http://a0.twimg.com/images/themes/theme1/bg.png", |
| 786 | // ProfileBackgroundImageURLHttps: "http://a0.twimg.com/images/themes/theme1/bg.png", |
| 787 | Following: nil, |
| 788 | |
| 789 | // huh |
| 790 | DefaultProfile: false, |
| 791 | DefaultProfileImage: false, |
| 792 | ShowAllInlineMedia: false, |
| 793 | |
| 794 | // User Stats |
| 795 | // ListedCount: 0, |
| 796 | // FavouritesCount: 0, |
| 797 | // FollowersCount: 200, |
| 798 | // FriendsCount: 100, |
| 799 | // StatusesCount: 333, |
| 800 | } |
| 801 | } |
| 802 | |
| 803 | // This request is an "internal" request, and thus, these are very little to no docs. this is a problem. |
| 804 | // The most docs I could find: https://blog.fgribreau.com/2012/01/twitter-unofficial-api-getting-tweets.html |
no test coverage detected