View Source StickerClient.Downloader (stickerclient v0.2.1)
StickerClient.Downloader
is used to download content from the Signal sticker API,
including Pack information and Stickers.
Summary
Functions
Download a manifest given a Pack ID and Pack Key.
Download a pack from the given valid URL, optionally providing concurrency settings.
Download a pack from the given Pack Key and Pack ID, providing concurrency settings.
Download a sticker, providing either a sticker ID as integer, or, a StickerClient.Sticker
with a set ID.
Downloads multiple stickers, providing an enumerable containing sticker IDs as integers, or,StickerClient.Sticker
's, with set IDs
Functions
@spec download_manifest(pack_id :: bitstring(), pack_key :: bitstring()) :: {:ok, StickerClient.Pack.t()} | {:error, StickerClient.Exception.t()}
Download a manifest given a Pack ID and Pack Key.
The downloaded manifest will not contain Sticker data, only Sticker metadata.
@spec download_pack(url :: bitstring(), options :: keyword()) :: {:ok, StickerClient.Pack.t()} | {:error, StickerClient.Exception.t()}
Download a pack from the given valid URL, optionally providing concurrency settings.
The URL takes the format of https://signal.arwt/addstickers/#pack_id=PACK_ID&pack_key=PACK_KEY
.
@spec download_pack( pack_id :: bitstring(), pack_key :: bitstring(), options :: keyword() ) :: {:ok, StickerClient.Pack.t()} | {:error, StickerClient.Exception.t()}
Download a pack from the given Pack Key and Pack ID, providing concurrency settings.
@spec download_sticker( sticker :: StickerClient.Sticker.t(), pack_id :: bitstring(), pack_key :: bitstring() ) :: {:ok, StickerClient.Sticker.t()} | {:error, StickerClient.Exception.t()}
@spec download_sticker( sticker_id :: integer(), pack_id :: bitstring(), pack_key :: bitstring() ) :: {:ok, StickerClient.Sticker.t()} | {:error, StickerClient.Exception.t()}
Download a sticker, providing either a sticker ID as integer, or, a StickerClient.Sticker
with a set ID.
The downloaded sticker will not have metadata such as the associated emoji if a
numeric ID is given, or if the provided StickerClient.Sticker
also does not contain
metadata.
@spec download_stickers( stickers :: [StickerClient.Sticker.t()] | [integer()], pack_id :: bitstring(), pack_key :: bitstring(), options :: keyword() ) :: [StickerClient.Sticker.t()] | {:error, StickerClient.Exception.t()}
Downloads multiple stickers, providing an enumerable containing sticker IDs as integers, or,StickerClient.Sticker
's, with set IDs
The downloaded sticker will not have metadata such as the associated emoji if a
numeric ID is given, or if the provided StickerClient.Sticker
also does not contain
metadata.