Table of Contents

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

account PhoneNumber

The account.

packId string

The hex pack id.

packKey string

The hex pack key that decrypts the pack.

cancellationToken CancellationToken

Cancels the request.

Returns

Task

A task that completes when the pack was installed.

Exceptions

ArgumentException

packId or packKey is 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

account PhoneNumber

The account.

addStickersUrl Uri

The share link.

cancellationToken CancellationToken

Cancels the request.

Returns

Task

A task that completes when the pack was installed.

Exceptions

ArgumentException

The link has no pack_id or pack_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

account PhoneNumber

The account.

cancellationToken CancellationToken

Cancels the request.

Returns

Task<IReadOnlyList<StickerPack>>

The sticker packs.