misarpost library

MisarPost Dart SDK — https://docs.misar.io/post

Classes

AnalyticsResource
The analytics resource group.
ComposerResource
The composer resource group.
ConnectionsResource
The connections resource group.
ContentrippleResource
The contentripple resource group.
DraftsResource
The drafts resource group.
GenerateResource
The generate resource group.
GrowthResource
The growth resource group.
MediaResource
The media resource group.
MisarPostClient
MisarPost API client. Every resource (client.posts, client.generate, …) is generated from the API's own route tree (sdks/manifest.json).
NotificationsResource
The notifications resource group.
PersonaforgeResource
The personaforge resource group.
PostsResource
The posts resource group.
PostTagsResource
The postTags resource group.
PostTemplatesResource
The postTemplates resource group.
Resources
Every resource group, generated from sdks/manifest.json.
Transport
HTTP transport the generated resource layer is written against. One credential, one path in: the account API key (mpk_…) sent as Authorization: Bearer. Retries throttles, 5xx and network failures with exponential backoff from 200 ms honouring Retry-After — never a plan refusal.
TrendpulseResource
The trendpulse resource group.
VideoResource
The video resource group.
WebhooksResource
The webhooks resource group.
WorkspacesResource
The workspaces resource group.

Constants

webhookSignatureHeader → const String
Outbound webhook deliveries carry X-MisarPost-Signature: sha256=<hex> — the HMAC-SHA256 of the RAW request body keyed with the endpoint's mpwh_ secret.

Functions

computeWebhookSignature(String secret, List<int> rawBody) → String
paginate(Future<Map<String, dynamic>> fetchPage(int page), {int maxPages = 0}) → Stream<Map<String, dynamic>>
Page through MisarPost's ?page= list endpoints: calls fetchPage with page 1, 2, … until the page the server reports as totalPages — or, when an endpoint reports no totals, until a page comes back empty.
verifyWebhookSignature(String secret, List<int> rawBody, String? signatureHeader) → bool
Constant-time check of signatureHeader against the raw body.

Exceptions / Errors

MisarPostException
Any non-2xx answer from the MisarPost API, or a transport failure (status 0).
MisarPostPlanLimitException
The plan behind the API key blocks this call: HTTP 402 with code: "plan_limit_exceeded" and an upgrade offer. Detected by code before the status and never retried. All copy comes from the server.