fopost 0.3.0
fopost: ^0.3.0 copied to clipboard
Official Dart SDK for the FoPost API. Schedule, publish and analyze social media posts across every connected platform, from Dart or Flutter.
Changelog #
0.3.0 #
-
Breaking:
BlogSettings.autoPublishand theautoPublishargument ofblog.updateSettingsare removed. Nothing publishes without approval:blog.submitArticlemoves a draft, failed or rejected article toin_review, andpublishArticleor apublishAton a draft answers409until it is submitted. -
Added:
blog.suggestSeedssuggests about ten search terms from the blog goal and topics; pass the current seeds to refine and a prompt to steer. Spends AI credits. -
Added:
BlogSettings.goal(BlogGoal),focusTopics,avoidTopicsandplanRun(BlogPlanRun), withgoal,focusTopicsandavoidTopicsonblog.updateSettings;BlogKeyword.fitReason; andBlogArticleStatus.inReview. -
Changed:
blog.planKeywordsno longer fills the calendar. Results land assuggestedkeywords; setting one toplannedpicks it for the next free date.reviewHoldDaysis now the days before its planned date that a picked keyword starts being written. -
Added:
whatsappfor a WhatsApp Business connection: the business profile (profile,updateProfile,requestDisplayName,setUsername), message templates including the platform's own library (templates,createTemplate,importTemplate, …), groups, blocking, commerce settings and flows (createFlow,uploadFlowJson,publishFlow,flowResponses, …), plusaccountEvents. All need theaccountsscope. -
Added:
whatsapp.createSandboxSessionandsandboxSessionsinvite a tester to the platform-owned WhatsApp test number. Inviting sends a template, so it needs thepublishscope. -
Added:
blog, settings, the keyword plan and the articles written from it.getSettings,updateSettings,rotateWebsiteSecret,testWebsite,listKeywords,planKeywords,addKeyword,updateKeyword,deleteKeyword,listArticles,requestArticle,getArticle,updateArticle,regenerateArticle,publishArticle,rejectArticleanddeleteArticle. Planning, requesting and regenerating spend AI credits and answer402on an empty balance; publishing needs thepublishscope. -
Added:
verifyWebhookchecks a delivery's signature over the raw bytes in constant time, preferring the timestampedX-FoPost-Signature-256within a 300 second tolerance and falling back toX-FoPost-Signatureonly when no timestamp header is present. Returns aWebhookEnvelope; read anarticle.publishedone withBlogArticlePublished.fromJson. -
Added:
media.limitsreturns anUploadLimitswith the account's per-file ceiling (maxFileBytes), its source, the connected-account count, the next tier, the multipart ceiling, the files-per-upload cap and the accepted types. -
Added:
posts.createandposts.updatetakefiles, up to five. Files within the multipart ceiling go with the request; larger ones are uploaded direct and attached to the first content block, so the route never shows. -
Added:
FoPostFile.streamfor a file read from a stream of known length, andFoPostFile.mimeType.media.uploadDirectFilestreams such a file to storage instead of buffering it. Multipart parts stream too. -
Added:
presignanduploadDirecttakefolderId,origin,brandRole,brandVoiceIdandpersonConsent;PresignedUpload.maxFileBytes. -
Added: a
413is thrown asFoPostFileTooLargeExceptionwithmaxFileBytes,fileBytesandupgradeUrl. -
Changed: the direct-upload path no longer documents a 50 MB ceiling; the account's
maxFileBytes(up to 5 GB) applies.FoPostFile.bytesis now nullable, since a stream-backed file has none. -
Added:
InboxItem.moderationStatuscarries the platform's own state for a comment (published,held,spam,rejected), andInboxAccount.reconnectRequiredflags an account connected before the inbox asked for a permission it needs. -
Added:
broadcasts— one message into every conversation the workspace already has with a segment of its contacts.list,get,create,update,delete,send,cancelandrecipients. Reading needs theinboxscope;sendandcancelalso needpublish. -
Added:
sequences— a series of messages on a delay.list,get,create,update,delete,enroll,unenrollandenrollments.enrollandunenrollneedpublish. -
Added: both honour each network's messaging window server-side. Messenger and Instagram take a business-initiated message only within 24 hours of the contact's last one, so recipients outside it come back skipped with
window_closedand nothing is attempted — the number sent is often lower than the audience. -
Added:
contacts— the people behind the inbox.list,get,create,update,delete,conversationsandimport, pluslistFields,createField,updateFieldanddeleteFieldfor the columns a workspace keeps about a person. Needs theinboxscope. -
Added:
contacts.conversationAnalytics— inbox volume and reply time per thread. Needs theanalyticsscope, and each row'skeyis an opaque handle for the thread rather than the id or handle the inbox groups on. -
Added: Meta messaging settings on
accounts:iceBreakers,setIceBreakersanddeleteIceBreakers(Facebook Pages and Instagram), pluspersistentMenu,setPersistentMenu,deletePersistentMenu,greeting,setGreetinganddeleteGreeting(Facebook Pages). A network without a field answers 400. -
Added:
accounts.webhookSubscriptionreports whether the network is still delivering events for an account, andresubscribeWebhookputs a lapsed subscription back. -
Added:
inbox.handoverpasses a Messenger thread to another Meta app, or takes it back when noappIdis given (inboxscope, pluspublish). -
Added:
client.googleAdswraps the Google Ads surface: keywords and keyword ideas, search terms, bid strategies, ad schedule, negative keyword lists, assets, Performance Max asset groups, Local Services leads, conversions, andqueryfor a raw GAQL read. -
Added:
client.ads.authorizeGooglestarts a Google Ads connection. -
Added:
client.blogsfor content that already lives on a connected site —listBlogs,listArticles,getArticle,createArticle,updateArticle,deleteArticle,listProductsandupdateProduct, withRemoteBlog,RemoteArticleandRemoteProduct. Reads need thepostsscope; the writes needpostsandpublish. Updating an article changes the live one in place and never creates a duplicate. -
Added:
accounts.slackChannels,slackMembers,getSlackIdentityandupdateSlackIdentityfor a Slack account's channels, workspace members and posting identity. Aclear*flag onupdateSlackIdentitysendsnull. Needs theaccountsscope. -
Added: the Discord bot surface on
accounts—discordChannels,switchDiscordChannel,getDiscordIdentity,updateDiscordIdentity,discordPins,deleteDiscordMessage,pinDiscordMessage,unpinDiscordMessage,crosspostDiscordMessage,createDiscordThread,sendDiscordDirectMessage,discordEvents,getDiscordEvent,createDiscordEvent,updateDiscordEvent,deleteDiscordEvent,discordMembers,discordMember,discordRoles,createDiscordRole,updateDiscordRole,deleteDiscordRole,addDiscordMemberRoleandremoveDiscordMemberRole. Needs theaccountsscope, pluspublishfor anything that posts; a webhook connection answers409 webhook_connection. -
Added:
DiscordChannel.canPost— false when a channel permission in Discord shuts the bot out.switchDiscordChannelanswers409 channel_not_writablefor one. -
Added: per-network extras on
accounts, allaccountsscope: Pinterest boards (pinterestBoards,createPinterestBoard), YouTube playlists and captions (youtubePlaylists,createYouTubePlaylist,setDefaultYouTubePlaylist,youtubeCaptions,uploadYouTubeCaptions,youtubeTranscript), Bluesky post languages (blueskyLanguages,setBlueskyLanguages), TikTok music and place search plus video lookup (tiktokMusic,tiktokLocations,tiktokVideoLookup), TikTok creator info (tiktokCreatorInfo), Instagram audio, publishing limit and stories (instagramAudio,instagramPublishingLimit,instagramStories,instagramStoryInsights) and LinkedIn mentions (linkedinMentions), with a model each. -
Added:
accounts.redditSubreddits,redditSubredditRules,redditFlairsandsetRedditDefaultSubredditfor the subreddits a Reddit account is in, a subreddit's rules and post flairs, and where posts go when a post names no subreddit. Needs theaccountsscope. -
Added:
validate.subreddit, which answers whether a subreddit exists and takes a post from an account. Needs thepostsscope. -
Added:
inbox.vote, which votes an item up or down, or takes the vote back withnone. Needsinboxandpublish. -
Added:
Account.reconnectRequired, andvoteandcanVoteon an inbox item. -
Added: the ads campaign tree (
accountTree; get, create, update, delete and duplicate for campaigns, ad sets and network ads;bulkSetStatus), creatives (creatives,createCreative,creative,deleteCreative), audience management (audience,updateAudience,deleteAudience,addAudienceUsers),estimateReach, date-rangeinsightsandadInsights, and lead forms with the stored leads feed (leadForm,archiveLeadForm,leadsFeed,leadPages,subscribeLeadPage,unsubscribeLeadPage). Campaign, ad set and network ad writes and bulk status need thepublishscope on top ofads. -
Added:
urlTagsonads.create, a query string appended to every link in the ad. -
Added:
validateresource (post,length,media) for standalone checks that store nothing. Needs thepostsscope. -
Added:
accountGroupsresource (list,get,create,update,delete,setMembers) andaccounts.rename/accounts.move. Needs theaccountsscope. -
Added:
accounts.list(groupId:),platformNameonAccountandAccountDetail, andaccountGroupIdonposts.create, whereaccountsis now optional. -
Added:
accounts.createTelegramConnectCode/getTelegramConnectStatusto connect a Telegram chat with a one-time code, andaccounts.getTelegramBotCommands/setTelegramBotCommands/deleteTelegramBotCommandsfor the bot's command menu in a connected chat. Needs theaccountsscope. -
Added: inbox actions
like,unlike,pin,unpin,react,editComment,startConversationandsetTyping, all needing thepublishscope.replytakes optionalmediaIdsandquickReplies, and itstextmay be null whenmediaIdsis given.deletealso removes our own replies. -
Added:
liked,pinned,reaction,editedAtand thecanLike,canPin,canEdit,canReact,canSendMedia,canQuickReply,canPrivateReplyflags onInboxItem;canStartConversationonInboxAccount.
0.2.0 #
- Added:
inboxandadsresources, with their models. The fouradscalls that spend money (boost,create,setStatus,delete) need thepublishscope as well asads. PageMetaalso reads thepage/perPage/totalshape the inbox lists send.
0.1.0 #
First release.
FoPostclient over the FoPost REST API, withX-API-Keyauth, a 30 second per-request timeout, and automatic retries on 429, 5xx and transport errors.- Resources:
posts,workspaces,accounts,communities,labels,webhooks,analytics,automations,media. - Typed models with hand-written
fromJson, so no build step is needed. - Typed exceptions per status: validation, authentication, payment required
(carrying
upgradeUrl), permission denied, not found, rate limit (carryingretryAfter) and server errors. FoPost.requestas an escape hatch for endpoints the SDK does not wrap.- Pure Dart, so it runs on Flutter (iOS, Android, web, desktop) and on the server.