StickerProvider

public protocol StickerProvider : AnyObject

Types conforming to StickerProvider can implement a custom service to load stickers from local/network sources.

  • Loads initial search page with the default set of stickers.

    Important

    This method will be called on a background thread. The completion handler will be dispatched to the main thread internally.

    Declaration

    Swift

    func trending(offset: Int, limit: Int, completion: @escaping (Result<StickerProviderResult, Error>) -> Void)

    Parameters

    offset

    The number of items to skip for the current page.

    limit

    The number of items to load for the current page.

    completion

    The completion handler.

  • Loads search results for the given query.

    Important

    This method will be called on a background thread. The completion handler will be dispatched to the main thread internally.

    Declaration

    Swift

    func search(query: String, offset: Int, limit: Int, completion: @escaping (Result<StickerProviderResult, Error>) -> Void)

    Parameters

    query

    The query string.

    offset

    The number of items to skip for the current page.

    limit

    The number of items to load for the current page.

    completion

    The completion handler.