An utility for client developers with CoreTweet
C#
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/CoreTweetSupplement
test/CoreTweetSupplement.Tests
.gitattributes
.gitignore
CoreTweetSupplement.sln
LICENSE.txt
README.md
appveyor.yml

README.md

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