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

Symbol 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 symbol/cashtag 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 cashtag. Therefore the difference between the two numbers will be the length of the hashtag name plus one (for the ‘$’ character). Example: [12,17].
textName of the cashhtag, minus the leading ‘$’ character. Example: "twtr".

Functions

Decode JSON-decoded map into t/0

Link to this section Types

Specs

t() :: %Tw.V1_1.Symbol{indices: [integer()], text: binary()}
fielddescription
indicesAn array of integers indicating the offsets within the Tweet text where the symbol/cashtag 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 cashtag. Therefore the difference between the two numbers will be the length of the hashtag name plus one (for the ‘$’ character). Example: [12,17].
textName of the cashhtag, minus the leading ‘$’ character. Example: "twtr".

Link to this section Functions

Specs

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

Decode JSON-decoded map into t/0