@autoapicom/client 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # auto-api-client-typescript
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@auto-api/client)](https://npmjs.com/package/@auto-api/client)
4
- [![Node version](https://img.shields.io/node/v/@auto-api/client)](https://npmjs.com/package/@auto-api/client)
5
- [![License](https://img.shields.io/npm/l/@auto-api/client)](LICENSE)
3
+ [![npm version](https://img.shields.io/npm/v/@autoapicom/client)](https://npmjs.com/package/@autoapicom/client)
4
+ [![Node version](https://img.shields.io/node/v/@autoapicom/client)](https://npmjs.com/package/@autoapicom/client)
5
+ [![License](https://img.shields.io/npm/l/@autoapicom/client)](LICENSE)
6
6
 
7
7
  TypeScript client for the [auto-api.com](https://auto-api.com) car listings API. Zero dependencies — uses the built-in `fetch`.
8
8
 
@@ -11,15 +11,15 @@ Search and filter offers across 8 marketplaces (encar, mobile.de, autoscout24, c
11
11
  ## Installation
12
12
 
13
13
  ```bash
14
- npm install @auto-api/client
14
+ npm install @autoapicom/client
15
15
  ```
16
16
 
17
17
  ## Usage
18
18
 
19
19
  ```typescript
20
- import { Client } from '@auto-api/client';
20
+ import { Client } from '@autoapicom/client';
21
21
 
22
- const client = new Client('your-api-key');
22
+ const client = new Client('your-api-key', 'https://api1.auto-api.com');
23
23
  ```
24
24
 
25
25
  ### Get filters
@@ -67,7 +67,7 @@ const info = await client.getOfferByUrl('https://encar.com/dc/dc_cardetailview.d
67
67
  ### Error handling
68
68
 
69
69
  ```typescript
70
- import { Client, AuthError, ApiError } from '@auto-api/client';
70
+ import { Client, AuthError, ApiError } from '@autoapicom/client';
71
71
 
72
72
  try {
73
73
  const offers = await client.getOffers('encar', { page: 1 });
@@ -98,8 +98,8 @@ try {
98
98
 
99
99
  | Language | Package |
100
100
  |----------|---------|
101
- | PHP | [auto-api/client](https://github.com/autoapicom/auto-api-php) |
102
- | Python | [auto-api-client](https://github.com/autoapicom/auto-api-python) |
101
+ | PHP | [autoapi/client](https://github.com/autoapicom/auto-api-php) |
102
+ | Python | [autoapicom-client](https://github.com/autoapicom/auto-api-python) |
103
103
  | Go | [auto-api-go](https://github.com/autoapicom/auto-api-go) |
104
104
  | C# | [AutoApi.Client](https://github.com/autoapicom/auto-api-dotnet) |
105
105
  | Java | [auto-api-client](https://github.com/autoapicom/auto-api-java) |
package/dist/client.js CHANGED
@@ -4,7 +4,7 @@ export class Client {
4
4
  baseUrl;
5
5
  apiVersion;
6
6
  timeout;
7
- constructor(apiKey, baseUrl = 'https://auto-api.com', apiVersion = 'v2') {
7
+ constructor(apiKey, baseUrl = 'https://api1.auto-api.com', apiVersion = 'v2') {
8
8
  this.apiKey = apiKey;
9
9
  this.baseUrl = baseUrl.replace(/\/+$/, '');
10
10
  this.apiVersion = apiVersion;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autoapicom/client",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Auto-api.com client for Node.js — fetch car listings from encar, mobile.de, autoscout24 and 5 other sources",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",