You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/ClientBuilder.js
+11-15Lines changed: 11 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ class ClientBuilder {
60
60
61
61
/**
62
62
* @param retries The maximum number of times to retry sending the request to the API. (Default is 5)
63
-
* @returnReturns <b>this</b> to accommodate method chaining.
63
+
* @returnClientBuilder <b>this</b> to accommodate method chaining.
64
64
*/
65
65
withMaxRetries(retries){
66
66
this.maxRetries=retries;
@@ -70,7 +70,7 @@ class ClientBuilder {
70
70
/**
71
71
* @param timeout The maximum time (in milliseconds) to wait for a connection, and also to wait for <br>
72
72
* the response to be read. (Default is 10000)
73
-
* @returnReturns <b>this</b> to accommodate method chaining.
73
+
* @returnClientBuilder <b>this</b> to accommodate method chaining.
74
74
*/
75
75
withMaxTimeout(timeout){
76
76
this.maxTimeout=timeout;
@@ -79,7 +79,7 @@ class ClientBuilder {
79
79
80
80
/**
81
81
* @param sender Default is a series of nested senders. See <b>buildSender()</b>.
82
-
* @returnReturns <b>this</b> to accommodate method chaining.
82
+
* @returnClientBuilder <b>this</b> to accommodate method chaining.
83
83
*/
84
84
withSender(sender){
85
85
this.httpSender=sender;
@@ -89,7 +89,7 @@ class ClientBuilder {
89
89
/**
90
90
* This may be useful when using a local installation of the Smarty APIs.
91
91
* @param url Defaults to the URL for the API corresponding to the <b>Client</b> object being built.
92
-
* @returnReturns <b>this</b> to accommodate method chaining.
92
+
* @returnClientBuilder <b>this</b> to accommodate method chaining.
93
93
*/
94
94
withBaseUrl(url){
95
95
this.baseUrl=url;
@@ -103,7 +103,7 @@ class ClientBuilder {
103
103
* @param protocol The protocol on the proxy server to which you wish to connect. If the proxy server uses HTTPS, then you must set the protocol to 'https'.
104
104
* @param username The username to login to the proxy.
105
105
* @param password The password to login to the proxy.
106
-
* @returnReturns <b>this</b> to accommodate method chaining.
106
+
* @returnClientBuilder <b>this</b> to accommodate method chaining.
107
107
*/
108
108
withProxy(host,port,protocol,username,password){
109
109
this.proxy={
@@ -125,52 +125,48 @@ class ClientBuilder {
125
125
/**
126
126
* Use this to add any additional headers you need.
127
127
* @param customHeaders A String to Object <b>Map</b> of header name/value pairs.
128
-
* @returnReturns <b>this</b> to accommodate method chaining.
128
+
* @returnClientBuilder <b>this</b> to accommodate method chaining.
129
129
*/
130
130
withCustomHeaders(customHeaders){
131
131
this.customHeaders=customHeaders;
132
-
133
132
returnthis;
134
133
}
135
134
136
135
/**
137
136
* Enables debug mode, which will print information about the HTTP request and response to console.log
138
-
* @returnReturns <b>this</b> to accommodate method chaining.
137
+
* @returnClientBuilder <b>this</b> to accommodate method chaining.
139
138
*/
140
139
withDebug(){
141
140
this.debug=true;
142
-
143
141
returnthis;
144
142
}
145
143
146
144
/**
147
145
* Allows the caller to specify the subscription license (aka "track") they wish to use.
148
146
* @param licenses A String Array of licenses.
149
-
* @returnsReturns <b>this</b> to accommodate method chaining.
147
+
* @returnsClientBuilder <b>this</b> to accommodate method chaining.
150
148
*/
151
149
withLicenses(licenses){
152
150
this.licenses=licenses;
153
-
154
151
returnthis;
155
152
}
156
153
157
154
/**
158
155
* Allows the caller to specify key and value pair that is added to the request
159
156
* @param {string} key - The query parameter key
160
157
* @param {string} value - The query parameter value
161
-
* @returnReturns <b>this</b> to accommodate method chaining.
158
+
* @returnClientBuilder <b>this</b> to accommodate method chaining.
162
159
*/
163
160
withCustomQuery(key,value){
164
161
this.customQueries.set(key,value);
165
-
166
162
returnthis;
167
163
}
168
164
169
165
/**
170
166
* Allows the caller to specify key and value pair and appends the value associated with the key, seperated by a comma.
171
167
* @param {string} key - The query parameter key
172
168
* @param {string} value - The query parameter value
173
-
* @returnReturns <b>this</b> to accommodate method chaining.
169
+
* @returnClientBuilder <b>this</b> to accommodate method chaining.
174
170
*/
175
171
withCustomCommaSeperatedQuery(key,value){
176
172
letvalues=this.customQueries.get(key);
@@ -185,7 +181,7 @@ class ClientBuilder {
185
181
186
182
/**
187
183
* Adds to the request query to use the component analysis feature.
188
-
* @returnReturns <b>this</b> to accommodate method chaining.
184
+
* @returnClientBuilder <b>this</b> to accommodate method chaining.
0 commit comments