From 40930eb31eb6a56638a7120e6da042accd0a0d88 Mon Sep 17 00:00:00 2001 From: Jiaxi Wang Date: Thu, 7 Dec 2023 11:19:54 -0500 Subject: [PATCH 1/2] first sdk commit --- package-lock.json | 2 +- src/api/search.ts | 5 ----- src/types.ts | 1 - test/api/search.test.ts | 3 +-- test/radar.test.ts | 3 +-- 5 files changed, 3 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 165a70bb..f32e09ce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "radar-sdk-js", - "version": "4.1.9", + "version": "4.1.12", "license": "ISC", "dependencies": { "@types/geojson": "^7946.0.10" diff --git a/src/api/search.ts b/src/api/search.ts index 86c2bdcc..57cc74d0 100644 --- a/src/api/search.ts +++ b/src/api/search.ts @@ -112,7 +112,6 @@ class SearchAPI { radius, chains, categories, - groups, limit, } = params; @@ -132,9 +131,6 @@ class SearchAPI { if (Array.isArray(categories)) { categories = categories.join(','); } - if (Array.isArray(groups)) { - groups = groups.join(','); - } const response: any = await Http.request({ method: 'GET', @@ -144,7 +140,6 @@ class SearchAPI { radius, chains, categories, - groups, limit, }, }); diff --git a/src/types.ts b/src/types.ts index 41cf76d0..388ca3db 100644 --- a/src/types.ts +++ b/src/types.ts @@ -353,7 +353,6 @@ export interface RadarSearchPlacesParams { radius?: number; chains?: string[] | string; categories?: string[] | string; - groups?: string[] | string; limit?: number; } diff --git a/test/api/search.test.ts b/test/api/search.test.ts index 17864cf0..1f417103 100644 --- a/test/api/search.test.ts +++ b/test/api/search.test.ts @@ -13,7 +13,6 @@ describe('Search', () => { const radius = 100; const chains = ['dunkin', 'sbucks']; const categories = ['coffee-shop']; - const groups = ['airport']; const tags = ['geofence-tag']; const metadata = { 'geofence-metadata-key': 'geofence-metadata-value' }; const layers: RadarGeocodeLayer[] = ['address']; @@ -69,7 +68,7 @@ describe('Search', () => { const near = { latitude, longitude }; - const response = await Search.searchPlaces({ near, radius, chains, categories, groups, limit }) + const response = await Search.searchPlaces({ near, radius, chains, categories, limit }) const validateResponse = getResponseWithDebug(options.debug, placesResponse, placesResponse); expect(response).toEqual(validateResponse); }); diff --git a/test/radar.test.ts b/test/radar.test.ts index 39d66514..d41635b7 100644 --- a/test/radar.test.ts +++ b/test/radar.test.ts @@ -35,7 +35,6 @@ describe('Radar', () => { const radius = 100; const chains = ['dunkin', 'sbucks']; const categories = ['coffee-shop']; - const groups = ['airport']; const tags = ['geofence-tags']; const limit = 50; @@ -311,7 +310,7 @@ describe('Radar', () => { it('should call searchPlaces', async () => { searchStub.mockResolvedValue({ places: [] }); - const response = await Radar.searchPlaces({ radius, chains, categories, groups, limit }); + const response = await Radar.searchPlaces({ radius, chains, categories, limit }); expect(response.places).toEqual([]); }); }); From 90722ea739102037f602107be815afa8fa667be0 Mon Sep 17 00:00:00 2001 From: Jiaxi Wang Date: Thu, 11 Apr 2024 10:27:43 -0400 Subject: [PATCH 2/2] white space --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 56b00f5c..3fee9a30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7667,4 +7667,4 @@ } } } -} \ No newline at end of file +}