We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a9440e3 commit 31e84edCopy full SHA for 31e84ed
.nvmrc
@@ -1 +1 @@
1
-v8.11.1
+8.11.2
src/services/api.js
@@ -265,3 +265,20 @@ export function getApiV3(token) {
265
}
266
return lastApiV3;
267
268
+
269
+/*
270
+ * Topcoder API v4.
271
+ */
272
273
+let lastApiV4 = null;
274
+/**
275
+ * Returns a new or existing Api object for Topcoder API v4
276
+ * @param {String} token Optional. Auth token for Topcoder API v4. (Uses same Token as v3)
277
+ * @return {Api} API v3 service object.
278
279
+export function getApiV4(token) {
280
+ if (!lastApiV4 || lastApiV4.private.token !== token) {
281
+ lastApiV4 = new Api(config.API.V4, token);
282
+ }
283
+ return lastApiV4;
284
+}
0 commit comments