apibrasil 1.0.0

SDK oficial Rust da plataforma APIBrasil: WhatsApp, SMS, consultas de CPF/CNPJ, veiculos, CEP, correios, pagamentos PIX/boleto e mais.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::core::{DeviceResponse, IntoBody, Result};

platform_service! {
    /// GeoIP (device-based): `POST /database/ip`.
    DatabaseIpService
}

impl DatabaseIpService {
    /// Consulta a base de IPs: `POST /database/ip` body `{"ip": "..."}`.
    pub async fn ip(&self, body: impl IntoBody) -> Result<DeviceResponse> {
        Ok(DeviceResponse(self.base.post("database/ip", body).await?))
    }
}