Skip to content

Commit

Permalink
Custom User Agent (#27)
Browse files Browse the repository at this point in the history
* remove gh action and add custom user agent for tracking

* update version
  • Loading branch information
vvillait88 authored May 18, 2022
1 parent 61fb667 commit 60953e0
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 36 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/publish-github.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "peopledatalabs",
"version": "3.1.1",
"version": "3.1.2",
"description": "JavaScript client with TypeScript support for the People Data Labs API",
"type": "module",
"main": "dist/index.cjs",
Expand Down
1 change: 1 addition & 0 deletions src/endpoints/autocomplete/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default (

const headers = {
'Accept-Encoding': 'gzip',
'User-Agent': 'PDL-JS-SDK',
};

axios.get<AutoCompleteResponse>(`${basePath}/autocomplete`, {
Expand Down
1 change: 1 addition & 0 deletions src/endpoints/bulk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default (basePath: string, apiKey: string, records: BulkPersonEnrichmentP
'Content-Type': 'application/json',
'Accept-Encoding': 'gzip',
'X-Api-Key': apiKey,
'User-Agent': 'PDL-JS-SDK',
};

return new Promise<BulkPersonEnrichmentResponse>((resolve, reject) => {
Expand Down
1 change: 1 addition & 0 deletions src/endpoints/cleaner/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default <T, K extends BaseResponse> (
check(params, basePath, apiKey, null, 'cleaner').then(() => {
const headers = {
'Accept-Encoding': 'gzip',
'User-Agent': 'PDL-JS-SDK',
};

axios.get<K>(`${basePath}/${type}/clean`, {
Expand Down
1 change: 1 addition & 0 deletions src/endpoints/enrichment/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default <T, K extends BaseResponse>(
check(params, basePath, apiKey, null, 'enrichment').then(() => {
const headers = {
'Accept-Encoding': 'gzip',
'User-Agent': 'PDL-JS-SDK',
};

axios.get<K>(`${basePath}/${type}/enrich`, {
Expand Down
1 change: 1 addition & 0 deletions src/endpoints/identify/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default (
check(params, basePath, apiKey, null, 'identify').then(() => {
const headers = {
'Accept-Encoding': 'gzip',
'User-Agent': 'PDL-JS-SDK',
};

axios.get<IdentifyResponse>(`${basePath}/person/identify`, {
Expand Down
1 change: 1 addition & 0 deletions src/endpoints/retrieve/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default (
check(params, basePath, apiKey, 'ID', 'retrieve').then(() => {
const headers = {
'Accept-Encoding': 'gzip',
'User-Agent': 'PDL-JS-SDK',
};

axios.get<RetrieveResponse>(`${basePath}/person/retrieve/${params.id}`, {
Expand Down
1 change: 1 addition & 0 deletions src/endpoints/search/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export default <T extends BaseSearchParams, K extends BaseResponse>(
'Content-Type': 'application/json',
'Accept-Encoding': 'gzip',
'X-Api-Key': apiKey,
'User-Agent': 'PDL-JS-SDK',
};

axios.post<K>(`${basePath}/${type}/search`, searchParams, { headers })
Expand Down

0 comments on commit 60953e0

Please sign in to comment.