### Install @anime-skip/api-client with npm Source: https://github.com/anime-skip/api-client-ts/blob/main/README.md Adds the GitHub npm registry for the @anime-skip scope and installs the package. Run this in your project root before using the client. ```bash echo "@anime-skip:registry=https://npm.pkg.github.com/" >> .npmrc npm i @anime-skip/api-client ``` -------------------------------- ### Run E2E tests with pnpm Source: https://github.com/anime-skip/api-client-ts/blob/main/README.md Starts the local docker environment and runs the E2E test suite. The database resets between test files, so initialize test data and accounts within each file. ```bash pnpm test:e2e ``` -------------------------------- ### Create client and call API methods Source: https://github.com/anime-skip/api-client-ts/blob/main/README.md Creates a fully managed client with automatic token refresh. Uses a shared, heavily rate-limited client ID. Calls healthCheck, login with an MD5-hashed password, and searchShows with a GraphQL selection string. ```ts import { createClient } from '@anime-skip/api-client'; import md5 from 'md5'; // Create a fully managed client // (tokens will be refreshed automatically) const client = createClient({ baseUrl: 'https://test.api.anime-skip.com', clientId: 'ZGfO0sMF3eCwLYf8yMSCJjlynwNGRXWE', }); // Call the API const { status } = await client.healthCheck(); const { authToken } = await client.login({ usernameEmail: 'username', passwordHash: md5('password'), }); const { authToken } = await client.searchShows(`{ id name }`, { search: 're:' }); ``` -------------------------------- ### Run E2E tests against dev API service Source: https://github.com/anime-skip/api-client-ts/blob/main/README.md For backend developers: builds the dev image, then runs the dev tests script. Requires the API service to be built first. ```bash cd /path/to/api-service make cd /path/to/this/project pnpm test:e2e:dev ``` -------------------------------- ### Import Gql types from @anime-skip/api-client Source: https://github.com/anime-skip/api-client-ts/blob/main/README.md Imports full GraphQL types as named exports prefixed with Gql. Extend, pick, or use them directly. ```ts import { GqlAccount, GqlEpisode, GqlCreateTimestampArgs, ... } from '@anime-skip/api-client'; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.