wuapi 0.9.0

Rust SDK for wuapi, a WhatsApp API for developers. Link numbers by QR or pairing code, send and receive messages, manage chats, contacts, groups and channels, split them into projects and verify webhooks.
Documentation
// Generated by wuapi-codegen from the OpenAPI spec. Do not edit: run `bun run codegen`.

use crate::http::{HttpClient, Method, Request, RequestParts, encode_path};
use crate::types;

/// WhatsApp sticker packs, read live from WhatsApp.
#[derive(Clone, Debug)]
pub struct StickerPacksResource {
    http: HttpClient,
}

impl StickerPacksResource {
    pub(crate) fn new(http: HttpClient) -> Self {
        Self { http }
    }

    /// Get a sticker pack
    ///
    /// A sticker pack and its stickers.
    ///
    /// `GET /v1/accounts/{accountId}/sticker-packs/{stickerPackId}`
    ///
    /// Safe to repeat: retried on timeouts, network errors, `429` and `5xx`.
    pub fn get(&self, account_id: &str, sticker_pack_id: &str) -> Request<types::StickerPack> {
        let parts = RequestParts::new(Method::Get, format!("/v1/accounts/{}/sticker-packs/{}", encode_path(account_id), encode_path(sticker_pack_id)))
            .retryable();
        self.http.request(parts)
    }
}