{"id":16226245,"url":"https://github.com/ghostdevv/coin-flip","last_synced_at":"2025-04-08T03:58:39.721Z","repository":{"id":214209176,"uuid":"695261128","full_name":"ghostdevv/coin-flip","owner":"ghostdevv","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-22T01:04:00.000Z","size":58,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T02:53:54.916Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ghostdevv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2023-09-22T17:58:33.000Z","updated_at":"2024-08-22T01:04:03.000Z","dependencies_parsed_at":"2024-07-13T01:43:05.517Z","dependency_job_id":"e73af0f3-4c28-4bef-a0e8-af80d9467440","html_url":"https://github.com/ghostdevv/coin-flip","commit_stats":null,"previous_names":["ghostdevv/coin-flip"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdevv%2Fcoin-flip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdevv%2Fcoin-flip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdevv%2Fcoin-flip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdevv%2Fcoin-flip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghostdevv","download_url":"https://codeload.github.com/ghostdevv/coin-flip/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773730,"owners_count":20993633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-10T12:48:34.367Z","updated_at":"2025-04-08T03:58:39.704Z","avatar_url":"https://github.com/ghostdevv.png","language":"TypeScript","readme":"# Coin Flip API\n\nUses random.org to generate 9 numbers between `0` and `1`, and converts that to `heads` or `tails`. It's best of nine so you need five of a side to win.\n\n## Requesting\n\nGET https://cf.willow.sh/\n\n\n```json\n\n{\n    \"result\": \"heads\",\n    \"heads\": 5,\n    \"tails\": 4,\n    \"sequence\": [\n        \"heads\",\n        \"heads\",\n        \"heads\",\n        \"tails\",\n        \"tails\",\n        \"tails\",\n        \"heads\",\n        \"tails\",\n        \"heads\"\n    ]\n}\n```\n\n```ts\ntype Coin = 'heads' | 'tails'\n\ninterface Response {\n    result: Coin;\n    heads: number;\n    tails: number;\n    sequence: Coin[]\n}\n```\n\n## Self Hosting\n\nYou can deploy this to Cloudflare workers, all you will need is a [random.org api key](https://api.random.org/dashboard). You should set this key as the `RANDOM_API_KEY` environment variable.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostdevv%2Fcoin-flip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostdevv%2Fcoin-flip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostdevv%2Fcoin-flip/lists"}