{"id":26928193,"url":"https://github.com/kerolloz/codeforces-api-ts","last_synced_at":"2025-04-02T04:18:43.876Z","repository":{"id":98649541,"uuid":"585718741","full_name":"kerolloz/codeforces-api-ts","owner":"kerolloz","description":"Codeforces-API-TS is a NodeJS Client Library for Codeforces API with Typescript support","archived":false,"fork":false,"pushed_at":"2025-02-19T23:15:00.000Z","size":147,"stargazers_count":7,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T10:36:37.198Z","etag":null,"topics":["codeforces","codeforces-api","codeforces-sdk","typescript"],"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/kerolloz.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-01-05T22:26:17.000Z","updated_at":"2025-02-19T23:14:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"36925bb8-aaec-4ddc-9a62-243f01d18b69","html_url":"https://github.com/kerolloz/codeforces-api-ts","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerolloz%2Fcodeforces-api-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerolloz%2Fcodeforces-api-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerolloz%2Fcodeforces-api-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerolloz%2Fcodeforces-api-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kerolloz","download_url":"https://codeload.github.com/kerolloz/codeforces-api-ts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246752570,"owners_count":20827987,"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":["codeforces","codeforces-api","codeforces-sdk","typescript"],"created_at":"2025-04-02T04:18:43.801Z","updated_at":"2025-04-02T04:18:43.868Z","avatar_url":"https://github.com/kerolloz.png","language":"TypeScript","readme":"# Codeforces-API-TS \u003ca target=\"_blank\" href=\"https://kounter.kerolloz.dev\"\u003e\u003cimg align=\"right\" src=\"https://kounter.kerolloz.dev/badge/kerolloz.codeforces-api-ts?style=for-the-badge\u0026cntSuffix=%20Views\u0026color=555\u0026label=\" /\u003e\u003c/a\u003e\n\n[![npm version](https://badge.fury.io/js/codeforces-api-ts.svg)](https://www.npmjs.com/package/codeforces-api-ts)\n[![npm downloads](https://img.shields.io/npm/dw/codeforces-api-ts)](https://www.npmjs.com/package/codeforces-api-ts)\n![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)\n\nCodeforces-API-TS is a NodeJS Client Library for [Codeforces API](http://codeforces.com/apiHelp) with Typescript support 💙\n\n\u003e **Note**  \n\u003e Source code in this repo is heavily inspired by [ahmed-dinar/codeforces-api-node](https://github.com/ahmed-dinar/codeforces-api-node).\n\n## Install\n\n```sh\nnpm install codeforces-api-ts\n```\n\n## Usage\n\n```typescript\nimport { CodeforcesAPI } from \"codeforces-api-ts\";\n\n(async () =\u003e {\n  CodeforcesAPI.setCredentials({\n    API_KEY: \"your-api-key\",\n    API_SECRET: \"your-api-secret\",\n  });\n\n  // all methods return a promise\n  await CodeforcesAPI.call(\"blogEntry.comments\", { blogEntryId: 79 });\n  await CodeforcesAPI.call(\"blogEntry.view\", { blogEntryId: 79 });\n  await CodeforcesAPI.call(\"contest.hacks\", { contestId: 566 });\n  await CodeforcesAPI.call(\"contest.list\", {});\n  await CodeforcesAPI.call(\"contest.ratingChanges\", { contestId: 566 });\n  await CodeforcesAPI.call(\"contest.standings\", { contestId: 566 });\n  await CodeforcesAPI.call(\"contest.status\", { contestId: 566 });\n  await CodeforcesAPI.call(\"problemset.problems\", {});\n  await CodeforcesAPI.call(\"problemset.recentStatus\", { count: 10 });\n  await CodeforcesAPI.call(\"recentActions\", { maxCount: 10 });\n  await CodeforcesAPI.call(\"user.blogEntries\", { handle: \"kerolloz\" });\n  await CodeforcesAPI.call(\"user.friends\", {}); // requires authorization\n  await CodeforcesAPI.call(\"user.info\", { handles: \"kerolloz\" });\n  await CodeforcesAPI.call(\"user.ratedList\", {});\n  await CodeforcesAPI.call(\"user.rating\", { handle: \"kerolloz\" });\n  await CodeforcesAPI.call(\"user.status\", { handle: \"kerolloz\" });\n})();\n\n```\n\n## API\n\nThe source code is well documented. I tried to make it as simple as possible and followed the same conventions as the official API. You can simply hover over the method name to see the description of the method and its parameters.\n\nYou can find function defentions and types in [src/types.ts](src/types.ts)\n\n### Methods \u0026 Parameters\n\n\u003eFull description of the API can be found on \u003chttp://codeforces.com/apiHelp\u003e.\n\n| Method                                                                                   | Parameters                                                   |  \n| ---------------------------------------------------------------------------------------- | ------------------------------------------------------------ |\n| [blogEntry.comments](http://codeforces.com/apiHelp/methods#blogEntry.comments)           | **\\*blogEntryId**                                            |\n| [blogEntry.view](http://codeforces.com/apiHelp/methods#blogEntry.view)                   | **\\*blogEntryId**                                            |\n| [contest.hacks](http://codeforces.com/apiHelp/methods#contest.hacks)                     | **\\*contestId**                                              |\n| [contest.list](http://codeforces.com/apiHelp/methods#contest.list)                       | gym                                                          |\n| [contest.ratingChanges](http://codeforces.com/apiHelp/methods#contest.ratingChanges)     | **\\*contestId**                                              |\n| [contest.standings](http://codeforces.com/apiHelp/methods#contest.standings)             | **\\*contestId**, from, count, handles,  room, showUnofficial |\n| [contest.status](http://codeforces.com/apiHelp/methods#contest.status)                   | **\\*contestId**, handle, from, count                         |\n| [problemset.problems](http://codeforces.com/apiHelp/methods#problemset.problems)         | tags, problemsetName                                         |\n| [problemset.recentStatus](http://codeforces.com/apiHelp/methods#problemset.recentStatus) | **\\*count**, problemsetName                                  |\n| [recentActions](http://codeforces.com/apiHelp/methods#recentActions)                     | **\\*maxCount**                                               |\n| [user.blogEntries](http://codeforces.com/apiHelp/methods#user.blogEntries)               | **\\*handle**                                                 |\n| [user.friends](http://codeforces.com/apiHelp/methods#user.friends)                       | onlyOnline                                                   |\n| [user.info](http://codeforces.com/apiHelp/methods#user.info)                             | **\\*handles**                                                |\n| [user.ratedList](http://codeforces.com/apiHelp/methods#user.ratedList)                   | activeOnly, includeRetired, contestId                        |\n| [user.rating](http://codeforces.com/apiHelp/methods#user.rating)                         | **\\*handle**                                                 |\n| [user.status](http://codeforces.com/apiHelp/methods#user.status)                         | **\\*handle**, from, count                                    |\n\u003e*required parameters\n\n### Authorization\n\nThe only method that requires authorization is `user.friends`. To authorize your requests you need to set your API_KEY and API_SECRET using the `setCredentials` method.\n\nYou can get your API key from \u003chttp://codeforces.com/settings/api\u003e.\n\n### Return Data\n\nData is returned in JSON format. For full description of data format visit \u003chttp://codeforces.com/apiHelp/objects\u003e.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkerolloz%2Fcodeforces-api-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkerolloz%2Fcodeforces-api-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkerolloz%2Fcodeforces-api-ts/lists"}