From 78a23222bb8a43f62a0182c2418b0fec2118e9c4 Mon Sep 17 00:00:00 2001 From: iBinh Date: Tue, 3 Aug 2021 11:43:03 +0700 Subject: [PATCH] add more parameters --- package.json | 2 +- services/autocomplete.js | 8 ++++++-- services/directions.js | 2 +- services/distancematrix.js | 2 +- services/static.js | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index b9e9e30..489e607 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@goongmaps/goong-sdk", - "version": "1.0.5", + "version": "1.0.6", "description": "A Javascript SDK working with Goong REST APIs", "main": "index.js", "files": [ diff --git a/services/autocomplete.js b/services/autocomplete.js index 4a54a6a..7070ce0 100644 --- a/services/autocomplete.js +++ b/services/autocomplete.js @@ -52,7 +52,10 @@ Autocomplete.search = function(config) { input: v.required(v.string), location: v.string, radius: v.number, - limit: v.number + limit: v.number, + session_token: v.string, + sessiontoken: v.string, + more_compound: v.boolean })(config); return this.client.createRequest({ @@ -84,7 +87,8 @@ Autocomplete.search = function(config) { */ Autocomplete.placeDetail = function(config) { v.assertShape({ - placeid: v.required(v.string) + placeid: v.required(v.string), + place_id: v.string })(config); return this.client.createRequest({ diff --git a/services/directions.js b/services/directions.js index 8abeccc..bcda9a9 100644 --- a/services/directions.js +++ b/services/directions.js @@ -39,7 +39,7 @@ Directions.getDirections = function(config) { v.assertShape({ origin: v.required(v.string), destination: v.required(v.string), - vehicle: v.oneOf('car', 'bike', 'taxi'), + vehicle: v.oneOf('car', 'bike', 'taxi', 'truct', 'hd'), type: v.oneOf('fastest', 'shortest'), alternatives: v.boolean })(config); diff --git a/services/distancematrix.js b/services/distancematrix.js index 0d2737a..df2359d 100644 --- a/services/distancematrix.js +++ b/services/distancematrix.js @@ -35,7 +35,7 @@ DistanceMatrix.getMatrix = function(config) { v.assertShape({ origins: v.required(v.string), destinations: v.required(v.string), - vehicle: v.oneOf('car', 'bike', 'taxi'), + vehicle: v.oneOf('car', 'bike', 'taxi', 'truct', 'hd'), type: v.oneOf('fastest', 'shortest') })(config); diff --git a/services/static.js b/services/static.js index efa514e..130db77 100644 --- a/services/static.js +++ b/services/static.js @@ -47,7 +47,7 @@ Static.getStaticImage = function(config) { destination: v.required(v.string), width: v.number, height: v.number, - vehicle: v.oneOf('car', 'bike', 'taxi'), + vehicle: v.oneOf('car', 'bike', 'taxi', 'truct', 'hd'), type: v.oneOf('fastest', 'shortest'), color: v.string })(config);