Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.57 KB

README.md

File metadata and controls

36 lines (27 loc) · 1.57 KB

CoreTweetSupplement

Provides useful extensions for client developers; made for CoreTweet.

How to Install

If you use NuGet, run the following command:

PM> Install-Package CoreTweetSupplement

If not, add one file to your project.

Methods

ParseSource(this Status)

This is a method to parse HTML-formated source field. Returns a Source struct, which includes the name of the source app and the URI of that.

StatusResponse status = token.Statuses.Show(id => 469320399126134784);
Source source = status.ParseSource();
//source.Name: "twicca"
//source.Href.AbsoluteUri: "http://twicca.r246.jp/"

EnumerateTextParts(this Status/DirectMessage)

This is a method to split the text into Tweet Entities. Enumerates order sorted and HTML-decoded parts of the text.

Example: TestEnumerateTextParts

GetExtendedTweetElements(this Status)

A variation of EnumerateTextParts which supports the new structure of Tweets.

GetProfileImageUrl / GetProfileImageUrlHttps(this User, string)

This is a method to get a URL pointing to the user's avatar image with given size.

Example: TestAlternativeProfileImageUri