encarapi 1.1.0 → 1.1.1
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 +6 -6
- package/package.json +2 -2
- package/src/china.js +1 -1
- package/src/index.js +3 -3
- package/src/korea.js +1 -1
package/README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
# EnCarAPI: Node.js client for Korean and Chinese used car data
|
|
2
2
|
|
|
3
|
-
Official **Node.js / TypeScript client** for [EnCarAPI](https://encarapi.com), the REST
|
|
3
|
+
Official **Node.js / TypeScript client** for [EnCarAPI](https://encarapi.com/?utm_source=readme&utm_medium=encarapi-node), the REST
|
|
4
4
|
**Encar API** and **Korean Car API**. One package for:
|
|
5
5
|
|
|
6
6
|
- **Korea:** Encar.com, KB Chachacha (`source: "kbc"`) and K Car (`source: "kcar"`), with
|
|
7
7
|
photos, specs, options, inspection reports, accident and ownership records, condition
|
|
8
8
|
reports, price history, a change feed and full catalog export.
|
|
9
|
-
- **China:** Dongchedi and Che168 in English via [ChinaCarAPI](https://chinacarapi.com)
|
|
9
|
+
- **China:** Dongchedi and Che168 in English via [ChinaCarAPI](https://chinacarapi.com/?utm_source=readme&utm_medium=encarapi-node)
|
|
10
10
|
(separate key or the China add-on for EnCarAPI keys).
|
|
11
11
|
|
|
12
12
|
Built for car exporters, dealers and marketplaces that need reliable used car data without
|
|
13
13
|
scraping, proxies or geo-blocks.
|
|
14
14
|
|
|
15
15
|
> **An API key is required.** The data is a paid service. Get a key (5-day trial) at
|
|
16
|
-
> **[encarapi.com](https://encarapi.com)**.
|
|
16
|
+
> **[encarapi.com](https://encarapi.com/?utm_source=readme&utm_medium=encarapi-node)**.
|
|
17
17
|
|
|
18
18
|
## Install
|
|
19
19
|
|
|
@@ -128,10 +128,10 @@ try {
|
|
|
128
128
|
|
|
129
129
|
## Links
|
|
130
130
|
|
|
131
|
-
- Website and pricing: https://encarapi.com
|
|
132
|
-
- Documentation: https://encarapi.com/documentation
|
|
131
|
+
- Website and pricing: [encarapi.com](https://encarapi.com/?utm_source=readme&utm_medium=encarapi-node)
|
|
132
|
+
- Documentation: [encarapi.com/documentation](https://encarapi.com/documentation?utm_source=readme&utm_medium=encarapi-node)
|
|
133
133
|
- OpenAPI reference: https://api.encarapi.com/reference
|
|
134
|
-
- China data: https://chinacarapi.com
|
|
134
|
+
- China data: [chinacarapi.com](https://chinacarapi.com/?utm_source=readme&utm_medium=encarapi-node)
|
|
135
135
|
- Python client: https://github.com/ThatMojo/encarapi-python
|
|
136
136
|
|
|
137
137
|
EnCarAPI is an independent service and not affiliated with Encar, KB Chachacha, K Car,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "encarapi",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Official Node.js client for EnCarAPI: Korean used car data (Encar, KB Chachacha, K Car) and Chinese used car data (Dongchedi, Che168) in one REST API.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"car export",
|
|
37
37
|
"vehicle data api"
|
|
38
38
|
],
|
|
39
|
-
"homepage": "https://encarapi.com",
|
|
39
|
+
"homepage": "https://encarapi.com/?utm_source=npm&utm_medium=encarapi-node",
|
|
40
40
|
"repository": {
|
|
41
41
|
"type": "git",
|
|
42
42
|
"url": "git+https://github.com/ThatMojo/encarapi-node.git"
|
package/src/china.js
CHANGED
|
@@ -16,7 +16,7 @@ class ChinaClient {
|
|
|
16
16
|
this.http = new HttpClient({
|
|
17
17
|
apiKey,
|
|
18
18
|
baseUrl: options.baseUrl || "https://api.chinacarapi.com",
|
|
19
|
-
signupUrl: "https://chinacarapi.com",
|
|
19
|
+
signupUrl: "https://chinacarapi.com/?utm_source=sdk&utm_medium=encarapi-node&utm_content=error#pricing",
|
|
20
20
|
product: "ChinaCarAPI",
|
|
21
21
|
fetchImpl: options.fetch,
|
|
22
22
|
});
|
package/src/index.js
CHANGED
|
@@ -23,7 +23,7 @@ class EnCarAPI {
|
|
|
23
23
|
if (!apiKey && !chinaKey) {
|
|
24
24
|
throw new EnCarAPIError(
|
|
25
25
|
"An API key is required. Pass new EnCarAPI('YOUR_KEY') or set ENCARAPI_KEY " +
|
|
26
|
-
"(Korea) / CHINACARAPI_KEY (China). Get a key at https://encarapi.com"
|
|
26
|
+
"(Korea) / CHINACARAPI_KEY (China). Get a key at https://encarapi.com/?utm_source=sdk&utm_medium=encarapi-node&utm_content=error"
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
29
|
this._apiKey = apiKey;
|
|
@@ -35,7 +35,7 @@ class EnCarAPI {
|
|
|
35
35
|
get korea() {
|
|
36
36
|
if (!this._korea) {
|
|
37
37
|
if (!this._apiKey) {
|
|
38
|
-
throw new EnCarAPIError("An EnCarAPI key is required for Korean data. Get one at https://encarapi.com");
|
|
38
|
+
throw new EnCarAPIError("An EnCarAPI key is required for Korean data. Get one at https://encarapi.com/?utm_source=sdk&utm_medium=encarapi-node&utm_content=error");
|
|
39
39
|
}
|
|
40
40
|
this._korea = new KoreaClient(this._apiKey, { baseUrl: this._options.baseUrl, fetch: this._options.fetch });
|
|
41
41
|
}
|
|
@@ -68,7 +68,7 @@ class ChinaCarAPI extends ChinaClient {
|
|
|
68
68
|
if (!apiKey) {
|
|
69
69
|
throw new EnCarAPIError(
|
|
70
70
|
"A ChinaCarAPI key is required. Pass new ChinaCarAPI('YOUR_KEY') or set CHINACARAPI_KEY. " +
|
|
71
|
-
"Get a key at https://chinacarapi.com"
|
|
71
|
+
"Get a key at https://chinacarapi.com/?utm_source=sdk&utm_medium=encarapi-node&utm_content=error"
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
74
|
super(apiKey, options);
|
package/src/korea.js
CHANGED
|
@@ -15,7 +15,7 @@ class KoreaClient {
|
|
|
15
15
|
this.http = new HttpClient({
|
|
16
16
|
apiKey,
|
|
17
17
|
baseUrl: options.baseUrl || "https://api.encarapi.com",
|
|
18
|
-
signupUrl: "https://encarapi.com",
|
|
18
|
+
signupUrl: "https://encarapi.com/?utm_source=sdk&utm_medium=encarapi-node&utm_content=error#pricing",
|
|
19
19
|
product: "EnCarAPI",
|
|
20
20
|
fetchImpl: options.fetch,
|
|
21
21
|
});
|