View Source Tw.V1_1.Hashtag (Tw v0.1.0)

Hashtag data structure and related functions. https://developer.twitter.com/en/docs/twitter-api/v1/data-dictionary/object-model/entities

Link to this section Summary

Types

t()
fielddescription
indicesAn array of integers indicating the offsets within the Tweet text where the hashtag begins and ends. The first integer represents the location of the # character in the Tweet text string. The second integer represents the location of the first character after the hashtag. Therefore the difference between the two numbers will be the length of the hashtag name plus one (for the ‘#’ character). Example: [32,38].
textName of the hashtag, minus the leading ‘#’ character. Example: "nodejs".

Functions

Decode JSON-decoded map into t/0

Link to this section Types

Specs

t() :: %Tw.V1_1.Hashtag{indices: [integer()], text: binary()}
fielddescription
indicesAn array of integers indicating the offsets within the Tweet text where the hashtag begins and ends. The first integer represents the location of the # character in the Tweet text string. The second integer represents the location of the first character after the hashtag. Therefore the difference between the two numbers will be the length of the hashtag name plus one (for the ‘#’ character). Example: [32,38].
textName of the hashtag, minus the leading ‘#’ character. Example: "nodejs".

Link to this section Functions

Specs

decode!(map()) :: t()

Decode JSON-decoded map into t/0