{"id":24923270,"url":"https://github.com/doarakko/x-bot-playground","last_synced_at":"2026-04-30T00:31:31.546Z","repository":{"id":229468593,"uuid":"762307719","full_name":"Doarakko/x-bot-playground","owner":"Doarakko","description":"Post to X(Twitter) regularly using Cloudflare.","archived":false,"fork":false,"pushed_at":"2024-04-22T17:50:25.000Z","size":129,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-01T16:38:10.221Z","etag":null,"topics":["cloudflare","twitter"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Doarakko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"Doarakko"}},"created_at":"2024-02-23T14:06:12.000Z","updated_at":"2024-07-24T14:03:40.235Z","dependencies_parsed_at":"2024-04-14T18:29:07.295Z","dependency_job_id":"861953a7-7505-42e0-a236-3e233e965670","html_url":"https://github.com/Doarakko/x-bot-playground","commit_stats":null,"previous_names":["doarakko/x-scheduled-post","doarakko/x-bot-playground"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Doarakko/x-bot-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doarakko%2Fx-bot-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doarakko%2Fx-bot-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doarakko%2Fx-bot-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doarakko%2Fx-bot-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Doarakko","download_url":"https://codeload.github.com/Doarakko/x-bot-playground/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doarakko%2Fx-bot-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32449686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"ssl_error","status_checked_at":"2026-04-29T22:10:49.234Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare","twitter"],"created_at":"2025-02-02T11:37:15.101Z","updated_at":"2026-04-30T00:31:31.528Z","avatar_url":"https://github.com/Doarakko.png","language":"TypeScript","funding_links":["https://github.com/sponsors/Doarakko"],"categories":[],"sub_categories":[],"readme":"# x-bot-playground\n\nPost to X(Twitter) regularly using Cloudflare.\n\n## Requirements\n\n- Cloudflare\n- Twitter Account\n- wrangler CLI\n- npm\n\n## Usage\n\n1. Clone the repository\n\n   ```bash\n   npx wrangler generate x-bot-playground https://github.com/Doarakko/x-bot-playground\n   npm i\n   ```\n\n1. Configure cron, default is once every hour\n\n   `wrandler.toml`\n\n   ```toml\n   [triggers]\n   crons = [\"0 * * * *\"]\n   ```\n\n1. Deploy to Cloudflare\n\n   ```bash\n   wrangler deploy\n   ```\n\n1. Set environmental variables to Cloudflare\n\n   ```bash\n   wrangler secret put TWITTER_CONSUMER_API_KEY\n   wrangler secret put TWITTER_CONSUMER_API_SECRET\n   wrangler secret put TWITTER_ACCESS_TOKEN\n   wrangler secret put TWITTER_ACCESS_TOKEN_SECRET\n   ```\n\n## Hints\n\n### Run on local\n\n1. Setup the environment variables\n\n   ```bash\n   cp .dev.vars.example .dev.vars\n   ```\n\n1. Run the worker\n\n   ```bash\n   wrangler dev\n   ```\n\n### Check if you can post\n\nRemove this comment out and access to your URL.\n\n`src/index.ts`\n\n```typescript\nexport default {\n    // async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise\u003cResponse\u003e {\n    //     const response = await post(env);\n    //     return new Response(JSON.stringify({ status: response.status, message: response.statusText }), {\n    //         headers: { 'Content-Type': 'application/json' },\n    //     });\n    // },\n\n```\n\n## References\n\n- [Sending a message with the Twitter API in a Cloudflare worker](https://www.leopradel.com/blog/use-twitter-api-clouflare-worker)\n- [Cloudflare Docs: Cron Triggers](https://developers.cloudflare.com/workers/configuration/cron-triggers/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoarakko%2Fx-bot-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoarakko%2Fx-bot-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoarakko%2Fx-bot-playground/lists"}