reeling.app

Reeling API and MCP examples

Clone the open-source Reeling examples to check account access, draft a video request, poll delivery and read analytics. Every account example starts with an offline fixture or a local request draft.

Reviewed 2026-10-20 · Reeling product team

Quick Reference — TL;DR Summary

Clone github.com/yomariano/reeling-examples to run zero-dependency Node.js 22+ scripts for account discovery, request drafting, delivery polling, and analytics. All examples execute in offline fixture mode by default and only make live network calls when passed --live-read or --publish.

Runnable Reeling Code Examples & Execution Modes

Script NameDefault Mode (Offline)Live FlagOperational Scope
examples/read-account.mjsDisplays mock project & channel summary--live-readQueries GET /projects and GET /channels; redacts private IDs.
examples/schedule-video.mjsPrints validated JSON request draft--publishSubmits POST /publish with reviewed payload and returns post_id.
examples/poll-status.mjsSimulates polling lifecycle with mock statuses--live-readPolls GET /posts/:id up to 12 times with 5s backoff intervals.
examples/read-analytics.mjsOutputs sample cross-network analytics--live-readFetches stored analytics overview for the selected project.
examples/observe-mcp.mjsOffline tool schema verification--samples=NMeasures public MCP tools/list latency without credential exposure.

Clone and run without credentials

Use Node.js 22 or later. The examples use Node’s built-in fetch and test runner and have no npm dependencies. The tests cover explicit channel selection, private/inbox defaults, per-platform failure handling, polling timeouts and ambiguous POST errors.

The default results are labeled offline fixtures. They demonstrate output shapes and recovery logic; they do not represent customer data or successful live posts.

git clone https://github.com/yomariano/reeling-examples.git
cd reeling-examples
npm test
node examples/read-account.mjs
node examples/poll-status.mjs
node examples/read-analytics.mjs

Configure a real account read

Create a local ignored .env using the documented variable names. Use your own project and channel IDs. Node does not load the file automatically; pass --env-file=.env. The account script requires --live-read before it sends either discovery GET.

Your API key can authorize writes. The scripts constrain their operations, but the key itself is not read-only. Keep the file and live outputs out of source control.

node --env-file=.env examples/read-account.mjs --live-read

Draft before publishing

Set the media URL, exact channel, project, caption and intended time locally. The scheduling script prints the request first without submitting. Review the destination, visibility and audience settings before adding --publish.

The example selects one channel per invocation and defaults to private YouTube visibility and TikTok inbox delivery. For several destinations, make explicit reviewed requests instead of silently selecting every connected channel.

node --env-file=.env examples/schedule-video.mjs
# After reviewing the payload and platform options:
node --env-file=.env examples/schedule-video.mjs --publish

Poll status and read analytics

Save the returned post_id. The polling example makes at most 12 reads, spaced five seconds apart. It reports processing, failure, reported publication and timeout separately. A scheduled post may remain pending beyond the observation window.

The analytics example reads the selected project’s stored overview. Its output is private account data. The supplied code does not request synchronization, manufacture missing metrics or infer revenue attribution.

node --env-file=.env examples/poll-status.mjs --live-read
node --env-file=.env examples/read-analytics.mjs --live-read

Plan an editorial calendar

Use the free calendar builder for dates, topic rotation and timezone labels. Download a CSV and review it in a spreadsheet with an owner and status. It is an editorial worksheet, not a bulk-upload contract.

For assistant integrations, generate a local or hosted MCP template and replace the placeholder key in your client. First verify project and channel reads; inspect the tool schema before approving publishing.

Frequently Asked Questions

Do the runnable examples require npm dependencies or third-party packages?

No. All examples in the reeling-examples repository are written in native modern JavaScript for Node.js 22+ using built-in fetch and node:test. No npm install is required to run the test suite or offline fixture scripts.

How do I switch an example from offline fixture mode to an authenticated live read?

Create a local '.env' file containing 'REELING_API_KEY=rl_live_your_key' and run the script with Node's native env flag and the live argument: 'node --env-file=.env examples/read-account.mjs --live-read'. The script confirms your identity without exposing private keys in terminal logs.

How do the examples prevent accidental duplicate social media posts?

The scheduling script requires a two-step process: running 'node examples/schedule-video.mjs' prints the local payload for review without submitting. Only passing the explicit '--publish' flag dispatches the HTTP POST. If a timeout occurs, the script prompts you to check the existing post ID rather than resubmitting.

Can I run the example suite in CI/CD pipelines to verify API contracts?

Yes. Run 'npm test' in the repository root. The built-in test suite verifies payload structures, explicit channel selection, date validation, and status polling logic against offline fixtures without requiring live network access or secret credentials.

Try it with your own workflow

Start with the offline examples, check the intended account and choose the next action deliberately.

Open the runnable examplesCreate a Reeling workspace