{"id":15908052,"url":"https://github.com/anime-skip/api-client-ts","last_synced_at":"2026-04-11T20:35:20.741Z","repository":{"id":42654578,"uuid":"286250039","full_name":"anime-skip/api-client-ts","owner":"anime-skip","description":"Client library for making API calls","archived":false,"fork":false,"pushed_at":"2022-05-16T00:18:04.000Z","size":274,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T20:07:48.306Z","etag":null,"topics":["axios","generated-code","graphql-client"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anime-skip.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}},"created_at":"2020-08-09T14:11:25.000Z","updated_at":"2022-01-01T15:59:43.000Z","dependencies_parsed_at":"2022-09-02T01:11:05.156Z","dependency_job_id":null,"html_url":"https://github.com/anime-skip/api-client-ts","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anime-skip%2Fapi-client-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anime-skip%2Fapi-client-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anime-skip%2Fapi-client-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anime-skip%2Fapi-client-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anime-skip","download_url":"https://codeload.github.com/anime-skip/api-client-ts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246911489,"owners_count":20853654,"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":["axios","generated-code","graphql-client"],"created_at":"2024-10-06T14:09:11.018Z","updated_at":"2025-10-26T06:45:35.608Z","avatar_url":"https://github.com/anime-skip.png","language":"TypeScript","readme":"# Typescript API Client\n\nA simple, fetch based API client that ships with types and powers all of Anime Skip!\n\nThis library is generated based on the current introspection result from `test.api.anime-skip.com`.\n\n```bash\necho \"@anime-skip:registry=https://npm.pkg.github.com/\" \u003e\u003e .npmrc\nnpm i @anime-skip/api-client\n```\n\n\u003e This is an alternative to Apollo or any other GraphQL client library out there! Use something else if you prefer, this is by no means a requirement to consume the API\n\n\u003cbr/\u003e\n\n## Contributing\n\nSee the [contributing guidelines](https://github.com/anime-skip/docs/wiki) for all of Anime Skip\n\n\u003cbr/\u003e\n\n## Usage\n\nTo call the api, you need a client id! Checkout the [API docs](https://www.anime-skip.com/api) to get one. The client id used below is a shared one that anyone can use, but it is heavily rate limited.\n\n```ts\nimport { createClient } from '@anime-skip/api-client';\nimport md5 from 'md5';\n\n// Create a fully managed client\n// (tokens will be refreshed automatically)\n\nconst client = createClient({\n  baseUrl: 'https://test.api.anime-skip.com',\n  clientId: 'ZGfO0sMF3eCwLYf8yMSCJjlynwNGRXWE',\n});\n\n// Call the API\n\nconst { status } = await client.healthCheck();\nconst { authToken } = await client.login({\n  usernameEmail: 'username',\n  passwordHash: md5('password'),\n});\nconst { authToken } = await client.searchShows(`{ id name }`, { search: 're:' });\n```\n\nThe methods exposed on the client match the queries and mutation names used in the graphql. For documentation checkout the [api playground](http://test.api.anime-skip.com/graphiql), but it's also include as JS Doc!\n\nFull types are also available as named exports all prefixed with `Gql`. Extend them, pick from them, or use them directly, whatever you prefer!\n\n```ts\nimport { GqlAccount, GqlEpisode, GqlCreateTimestampArgs, ... } from '@anime-skip/api-client';\n```\n\n\u003cbr/\u003e\n\n## E2E Tests\n\nThis is where the E2E tests of the API are located. They test both the API and this client library. Contributors should know how to run and update them, but making changes to the backend is not possible because it is private.\n\n\u003e If you think there's a problem with the API, head over to the support page to get help: \u003chttps://www.anime-skip.com/support\u003e\n\nAll tests are ran inside a local docker environment. To start them, run the following command:\n\n```bash\npnpm test:e2e\n```\n\nBetween each test suite (file), the database is reset. So if you create a new test suite, make sure you initialize test data and accounts within that file\n\nTests are orchestrated by `e2e/index.ts`. It spins the docker environment, runs the jest test suite, and stops docker.\n\n### Backend Devs Only\n\nTo run the tests against a development version of the api service, first build the dev image, then run the dev tests script\n\n```bash\ncd /path/to/api-service\nmake\ncd /path/to/this/project\npnpm test:e2e:dev\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanime-skip%2Fapi-client-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanime-skip%2Fapi-client-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanime-skip%2Fapi-client-ts/lists"}