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

Size 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
wWidth in pixels of this size. Example: 150.
hHeight in pixels of this size. Example: 150.
resizeResizing method used to obtain this size. A value of fit means that the media was resized to fit one dimension, keeping its native aspect ratio. A value of crop means that the media was cropped in order to fit a specific resolution. Example: "crop".

Functions

Decode JSON-decoded map into t/0

Link to this section Types

Specs

t() :: %Tw.V1_1.Size{h: integer(), resize: binary(), w: integer()}
fielddescription
wWidth in pixels of this size. Example: 150.
hHeight in pixels of this size. Example: 150.
resizeResizing method used to obtain this size. A value of fit means that the media was resized to fit one dimension, keeping its native aspect ratio. A value of crop means that the media was cropped in order to fit a specific resolution. Example: "crop".

Link to this section Functions

Specs

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

Decode JSON-decoded map into t/0