Skip to content

Commit

Permalink
docs: add companies
Browse files Browse the repository at this point in the history
  • Loading branch information
falsepopsky committed Oct 20, 2023
1 parent 6e8850e commit e2536a0
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default defineConfig({
nav: [
{ text: 'Guide', link: '/guide/getting-started' },
{
text: '0.3.0',
text: '0.4.0',
items: [
{
text: 'Changelog',
Expand Down
62 changes: 62 additions & 0 deletions docs/api/thetvdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,68 @@ Returns a character base record
await client.getCharacter('64140522');
```

## getCompanies

Returns a paginated list of companies records

| params | type | Required | Description |
| ------ | -------- | :------: | ------------------------------------ |
| page | `string` | Optional | The `page` of the Companies records. |

### Supported endpoint <Badge type="warning" text="endpoint" />

| method | endpoint |
| ------------------------------- | ------------ |
| <Badge type="tip" text="GET" /> | `/companies` |

### First 500 Companies records <Badge type="tip" text="example" />

```js
await client.getCompanies();
```

### Companies records for the page 94 <Badge type="tip" text="example" />

```js
await client.getCompanies('94');
```

## getCompaniesTypes

This method returns a list of companies records and does not require any parameters.

### Supported endpoint <Badge type="warning" text="endpoint" />

| method | endpoint |
| ------------------------------- | ------------------ |
| <Badge type="tip" text="GET" /> | `/companies/types` |

### Companies types records <Badge type="tip" text="example" />

```js
await client.getCompaniesTypes();
```

## getCompanyById

Returns a company record

| params | type | Required | Description |
| ------ | -------- | :------: | ------------------------ |
| id | `string` | Yes | The `id` of the Company. |

### Supported endpoint <Badge type="warning" text="endpoint" />

| method | endpoint |
| ------------------------------- | ---------------- |
| <Badge type="tip" text="GET" /> | `/companies/:id` |

### Single company record <Badge type="tip" text="example" />

```js
await client.getCompanyById('4');
```

## getEpisode

Returns an episode base or extended record
Expand Down
6 changes: 3 additions & 3 deletions docs/guide/supported-endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ List of endpoints from [TheTVDB API V4](https://thetvdb.github.io/v4-api/).
| `/awards/categories/{id}` | :white_check_mark: |
| `/awards/categories/{id}/extended` | :white_check_mark: |
| `/characters/{id}` | :white_check_mark: |
| `/companies` | :interrobang: |
| `/companies/types` | :interrobang: |
| `/companies/{id}` | :interrobang: |
| `/companies` | :white_check_mark: |
| `/companies/types` | :white_check_mark: |
| `/companies/{id}` | :white_check_mark: |
| `/content/ratings` | :white_check_mark: |
| `/countries` | :white_check_mark: |
| `/entities` | :interrobang: |
Expand Down

0 comments on commit e2536a0

Please sign in to comment.