Interface IStickerService
- Namespace
- Signal.Application.Abstractions
- Assembly
- Signal.Application.dll
Lists and installs sticker packs (/v1/sticker-packs/{number}).
public interface IStickerService
Methods
InstallAsync(PhoneNumber, string, string, CancellationToken)
Installs a sticker pack (POST /v1/sticker-packs/{number}).
Task InstallAsync(PhoneNumber account, string packId, string packKey, CancellationToken cancellationToken = default)
Parameters
accountPhoneNumberThe account.
packIdstringThe hex pack id.
packKeystringThe hex pack key that decrypts the pack.
cancellationTokenCancellationTokenCancels the request.
Returns
- Task
A task that completes when the pack was installed.
Exceptions
- ArgumentException
packIdorpackKeyis empty.
InstallAsync(PhoneNumber, Uri, CancellationToken)
Installs a sticker pack from its share link, https://signal.art/addstickers/#pack_id=…&pack_key=….
Task InstallAsync(PhoneNumber account, Uri addStickersUrl, CancellationToken cancellationToken = default)
Parameters
accountPhoneNumberThe account.
addStickersUrlUriThe share link.
cancellationTokenCancellationTokenCancels the request.
Returns
- Task
A task that completes when the pack was installed.
Exceptions
- ArgumentException
The link has no
pack_idorpack_key.
ListAsync(PhoneNumber, CancellationToken)
Lists the account's sticker packs (GET /v1/sticker-packs/{number}).
Task<IReadOnlyList<StickerPack>> ListAsync(PhoneNumber account, CancellationToken cancellationToken = default)
Parameters
accountPhoneNumberThe account.
cancellationTokenCancellationTokenCancels the request.
Returns
- Task<IReadOnlyList<StickerPack>>
The sticker packs.