{"id":31049246,"url":"https://github.com/captemulation/clash-of-clans-api","last_synced_at":"2025-09-14T21:48:38.159Z","repository":{"id":3950507,"uuid":"51489996","full_name":"CaptEmulation/clash-of-clans-api","owner":"CaptEmulation","description":":star::star::star: Clash of Clans :rage1: API NodeJS helper","archived":false,"fork":false,"pushed_at":"2023-03-05T16:32:07.000Z","size":419,"stargazers_count":66,"open_issues_count":7,"forks_count":25,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-09-04T10:55:56.384Z","etag":null,"topics":["clash-of-clans","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/CaptEmulation.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}},"created_at":"2016-02-11T02:41:52.000Z","updated_at":"2025-03-21T08:44:41.000Z","dependencies_parsed_at":"2023-07-05T19:18:15.754Z","dependency_job_id":null,"html_url":"https://github.com/CaptEmulation/clash-of-clans-api","commit_stats":{"total_commits":64,"total_committers":10,"mean_commits":6.4,"dds":0.390625,"last_synced_commit":"4b072f7c693b4a187f4aaf01184d57610e2e9262"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/CaptEmulation/clash-of-clans-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaptEmulation%2Fclash-of-clans-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaptEmulation%2Fclash-of-clans-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaptEmulation%2Fclash-of-clans-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaptEmulation%2Fclash-of-clans-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CaptEmulation","download_url":"https://codeload.github.com/CaptEmulation/clash-of-clans-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaptEmulation%2Fclash-of-clans-api/sbom","scorecard":{"id":27234,"data":{"date":"2025-08-11","repo":{"name":"github.com/CaptEmulation/clash-of-clans-api","commit":"4b072f7c693b4a187f4aaf01184d57610e2e9262"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.9,"checks":[{"name":"Code-Review","score":1,"reason":"Found 2/16 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"22 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-2j2x-2gpw-g8fm","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-14T18:11:23.742Z","repository_id":3950507,"created_at":"2025-08-14T18:11:23.742Z","updated_at":"2025-08-14T18:11:23.742Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275174427,"owners_count":25418064,"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","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["clash-of-clans","nodejs"],"created_at":"2025-09-14T21:48:36.287Z","updated_at":"2025-09-14T21:48:38.147Z","avatar_url":"https://github.com/CaptEmulation.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\nProvides an easy way to get started with the [Clash of Clans API](https://developer.clashofclans.com)\n\n# Installation\n\n`npm install --save clash-of-clans-api`\n\n# Usage\n\nAll fetches return a promise using [request-promise](https://www.npmjs.com/package/request-promise)\n\n## Instantiation\n\nIn order to get started with Clash of Clans API, you need to create an account at [developer.clashofclans.com](https://developer.clashofclans.com) and create a key.  You will need the IP of the host using to connect to the services.\n\nOnce you get your token, you have two choices.\n - Set the *COC_API_TOKEN* env variable\n - Pass in a token option when creating the ClashApi object\n\nExample:\n\n```\nimport clashApi from 'clash-of-clans-api';\nlet client = clashApi({\n  token: yourApiToken // Optional, can also use COC_API_TOKEN env variable\n});\n```\n\nIn addition, if you need to pass in any additional options to `request` (for example to set a proxy) then you can use the `request` option to do so:\n\n```\nimport clashApi from 'clash-of-clans-api';\nlet client = clashApi({\n  request: {\n    proxy: process.env.MY_PROXY,\n  },\n});\n```\n\nSee [request options](https://github.com/request/request#requestoptions-callback) for the full list of supported request options\n\n## Clan Search\n\nThere is a DSL for performing clan searches.  At least one filtering criteria must be defined and if name is used as part of search, it is required to be at least three characters long.\n\nSee https://developer.clashofclans.com/api-docs/index.html#!/clans/searchClans\n\nExample:\n```\nclient\n  .clans()\n  .withWarFrequency('always')\n  .withMinMembers(25)\n  .fetch()\n  .then(response =\u003e console.log(response))\n  .catch(err =\u003e console.log(err))\n```\n\nAll query parameters are supported, simply prepend `with` and capitalize the first letter of the query param.  Complete the request with a call to `fetch()`.\n\n## Clan by Tag\n\nRequest clan details by clan tag.  Be sure to include the hashtag `#`.\n\nExample:\n```\nclient\n  .clanByTag('#UPC2UQ')\n  .then(response =\u003e console.log(response))\n  .catch(err =\u003e console.log(err));\n```\n\n## Clan Members by Tag\n\nRequest clan member details by clan tag.  Be sure to include the hashtag `#`.\n\nExample:\n```\nclient\n  .clanMembersByTag('#UPC2UQ')\n  .then(response =\u003e console.log(response))\n  .catch(err =\u003e console.log(err));\n```\n\n## Clan Warlog by Tag\n\nRequest clan warlog by clan tag.  Be sure to include the hashtag `#`.\n\nExample:\n```\nclient\n  .clanWarlogByTag('#UPC2UQ')\n  .then(response =\u003e console.log(response))\n  .catch(err =\u003e console.log(err));\n```\n\n## Current War by Tag\n\nRequest current war information by clan tag.  Be sure to include the hashtag `#`.\n\nExample:\n```\nclient\n  .clanCurrentWarByTag(`#UPC2UQ`)\n  .then(response =\u003e console.log(response))\n  .catch(err =\u003e console.log(err));\n```\n\n## Clan War Leagues support\n\nRequest the current clan war leagues the clan is participating in.\n\nExample:\n```\nclient\n  .clanLeague(`#UPC2UQ`)\n  .then(response =\u003e console.log(response))\n  .catch(err =\u003e console.log(err));\n  \n// Response contains response.rounds[].warTags[]. Each of the warTags \n// can be used to retrieve further information about the league war.\nclient\n  .clanLeagueWars(response.rounds[0].warTags[0])\n  .then(response =\u003e console.log(response))\n  .catch(err =\u003e console.log(err));\n``` \n\n## Location\n\nLocation has a DSL for requesting location details\n\nExamples:\n\n```\n// Request all location details\nclient\n  .locations()\n  .fetch()\n  .then(response =\u003e console.log(response))\n  .catch(err =\u003e console.log(err));\n\n// Request details for a single location\nclient\n  .locations()\n  .withId(locationId)\n  .fetch()\n  .then(response =\u003e console.log(response))\n  .catch(err =\u003e console.log(err));\n\n// Request clan details for a single location\nclient\n  .locations()\n  .withId(locationId)\n  .byClan()\n  .fetch()\n  .then(response =\u003e console.log(response))\n  .catch(err =\u003e console.log(err));\n\n// Request player details for a single location\nclient\n  .locations()\n  .withId(locationId)\n  .byPlayer()\n  .fetch()\n  .then(response =\u003e console.log(response))\n  .catch(err =\u003e console.log(err));\n```\n\n## Tutorial for complete beginners\nhttps://medium.com/@alexionutale/how-to-use-clash-of-clans-api-cd4fe7406576?source=friends_link\u0026sk=c12a0c2a736658681878f20cc98af08f\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaptemulation%2Fclash-of-clans-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaptemulation%2Fclash-of-clans-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaptemulation%2Fclash-of-clans-api/lists"}