File tree Expand file tree Collapse file tree 3 files changed +33
-6
lines changed Expand file tree Collapse file tree 3 files changed +33
-6
lines changed Original file line number Diff line number Diff line change @@ -62,12 +62,15 @@ class DatastoreClient {
6262 constructor ( opts ) {
6363 this . _descriptors = { } ;
6464
65+ const servicePath =
66+ opts . servicePath || opts . apiEndpoint || this . constructor . servicePath ;
67+
6568 // Ensure that options include the service address and port.
6669 opts = Object . assign (
6770 {
6871 clientConfig : { } ,
6972 port : this . constructor . port ,
70- servicePath : this . constructor . servicePath ,
73+ servicePath,
7174 } ,
7275 opts
7376 ) ;
@@ -154,6 +157,14 @@ class DatastoreClient {
154157 return 'datastore.googleapis.com' ;
155158 }
156159
160+ /**
161+ * The DNS address for this API service - same as servicePath(),
162+ * exists for compatibility reasons.
163+ */
164+ static get apiEndpoint ( ) {
165+ return 'datastore.googleapis.com' ;
166+ }
167+
157168 /**
158169 * The port for this API service.
159170 */
Original file line number Diff line number Diff line change 11{
2- "updateTime": "2019-05-22T11:11:48.365770Z ",
2+ "updateTime": "2019-06-04T19:30:55.849433Z ",
33 "sources": [
44 {
55 "generator": {
66 "name": "artman",
7- "version": "0.20 .0",
8- "dockerImage": "googleapis/artman@sha256:3246adac900f4bdbd62920e80de2e5877380e44036b3feae13667ec255ebf5ec "
7+ "version": "0.23 .0",
8+ "dockerImage": "googleapis/artman@sha256:846102ebf7ea2239162deea69f64940443b4147f7c2e68d64b332416f74211ba "
99 }
1010 },
1111 {
1212 "git": {
1313 "name": "googleapis",
1414 "remote": "https://github.com/googleapis/googleapis.git",
15- "sha": "6ea045ad2ed95863557b9856760fa8760d8daee0 ",
16- "internalRef": "249345152 "
15+ "sha": "0026f4b890ed9e2388fb0573c0727defa6f5b82e ",
16+ "internalRef": "251265049 "
1717 }
1818 },
1919 {
Original file line number Diff line number Diff line change @@ -23,6 +23,22 @@ const error = new Error();
2323error . code = FAKE_STATUS_CODE ;
2424
2525describe ( 'DatastoreClient' , ( ) => {
26+ it ( 'has servicePath' , ( ) => {
27+ const servicePath = datastoreModule . v1 . DatastoreClient . servicePath ;
28+ assert ( servicePath ) ;
29+ } ) ;
30+
31+ it ( 'has apiEndpoint' , ( ) => {
32+ const apiEndpoint = datastoreModule . v1 . DatastoreClient . apiEndpoint ;
33+ assert ( apiEndpoint ) ;
34+ } ) ;
35+
36+ it ( 'has port' , ( ) => {
37+ const port = datastoreModule . v1 . DatastoreClient . port ;
38+ assert ( port ) ;
39+ assert ( typeof port === 'number' ) ;
40+ } ) ;
41+
2642 describe ( 'lookup' , ( ) => {
2743 it ( 'invokes lookup without error' , done => {
2844 const client = new datastoreModule . v1 . DatastoreClient ( {
You can’t perform that action at this time.
0 commit comments