Skip to content

Commit 97fa7f7

Browse files
authored
updated api signatures_user_space (#272)
1 parent b4d458a commit 97fa7f7

File tree

5 files changed

+47
-35
lines changed

5 files changed

+47
-35
lines changed

dist/web/pubnub.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7317,45 +7317,47 @@
73177317
},
73187318
};
73197319
// User Apis
7320-
this.setUser = function (args) {
7320+
this.createUser = function (args) {
73217321
return _this.objects.setUUIDMetadata({
73227322
uuid: args.userId,
73237323
data: args.data,
73247324
include: args.include,
73257325
});
73267326
};
7327-
this.deleteUser = function (args) {
7327+
this.updateUser = this.createUser;
7328+
this.removeUser = function (args) {
73287329
return _this.objects.removeUUIDMetadata({
73297330
uuid: args === null || args === void 0 ? void 0 : args.userId,
73307331
});
73317332
};
7332-
this.getUser = function (args) {
7333+
this.fetchUser = function (args) {
73337334
return _this.objects.getUUIDMetadata({
73347335
uuid: args === null || args === void 0 ? void 0 : args.userId,
73357336
include: args === null || args === void 0 ? void 0 : args.include,
73367337
});
73377338
};
7338-
this.getUsers = this.objects.getAllUUIDMetadata;
7339+
this.fetchUsers = this.objects.getAllUUIDMetadata;
73397340
// Space apis
7340-
this.setSpace = function (args) {
7341+
this.createSpace = function (args) {
73417342
return _this.objects.setChannelMetadata({
73427343
channel: args.spaceId,
73437344
data: args.data,
73447345
include: args.include,
73457346
});
73467347
};
7347-
this.deleteSpace = function (args) {
7348+
this.updateSpace = this.createSpace;
7349+
this.removeSpace = function (args) {
73487350
return _this.objects.removeChannelMetadata({
73497351
channel: args.spaceId,
73507352
});
73517353
};
7352-
this.getSpace = function (args) {
7354+
this.fetchSpace = function (args) {
73537355
return _this.objects.getChannelMetadata({
73547356
channel: args.spaceId,
73557357
include: args.include,
73567358
});
73577359
};
7358-
this.getSpaces = this.objects.getAllChannelMetadata;
7360+
this.fetchSpaces = this.objects.getAllChannelMetadata;
73597361
this.time = timeEndpoint;
73607362
// --- deprecated ------------------
73617363
this.stop = this.destroy; // --------

dist/web/pubnub.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/core/pubnub-common.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -283,45 +283,47 @@ var default_1 = /** @class */ (function () {
283283
},
284284
};
285285
// User Apis
286-
this.setUser = function (args) {
286+
this.createUser = function (args) {
287287
return _this.objects.setUUIDMetadata({
288288
uuid: args.userId,
289289
data: args.data,
290290
include: args.include,
291291
});
292292
};
293-
this.deleteUser = function (args) {
293+
this.updateUser = this.createUser;
294+
this.removeUser = function (args) {
294295
return _this.objects.removeUUIDMetadata({
295296
uuid: args === null || args === void 0 ? void 0 : args.userId,
296297
});
297298
};
298-
this.getUser = function (args) {
299+
this.fetchUser = function (args) {
299300
return _this.objects.getUUIDMetadata({
300301
uuid: args === null || args === void 0 ? void 0 : args.userId,
301302
include: args === null || args === void 0 ? void 0 : args.include,
302303
});
303304
};
304-
this.getUsers = this.objects.getAllUUIDMetadata;
305+
this.fetchUsers = this.objects.getAllUUIDMetadata;
305306
// Space apis
306-
this.setSpace = function (args) {
307+
this.createSpace = function (args) {
307308
return _this.objects.setChannelMetadata({
308309
channel: args.spaceId,
309310
data: args.data,
310311
include: args.include,
311312
});
312313
};
313-
this.deleteSpace = function (args) {
314+
this.updateSpace = this.createSpace;
315+
this.removeSpace = function (args) {
314316
return _this.objects.removeChannelMetadata({
315317
channel: args.spaceId,
316318
});
317319
};
318-
this.getSpace = function (args) {
320+
this.fetchSpace = function (args) {
319321
return _this.objects.getChannelMetadata({
320322
channel: args.spaceId,
321323
include: args.include,
322324
});
323325
};
324-
this.getSpaces = this.objects.getAllChannelMetadata;
326+
this.fetchSpaces = this.objects.getAllChannelMetadata;
325327
this.time = timeEndpoint;
326328
// --- deprecated ------------------
327329
this.stop = this.destroy; // --------

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/pubnub-common.js

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -190,22 +190,26 @@ export default class {
190190
objects;
191191

192192
// User
193-
setUser;
193+
createUser;
194194

195-
getUser;
195+
updateUser;
196196

197-
deleteUser;
197+
fetchUser;
198198

199-
getUsers;
199+
removeUser;
200+
201+
fetchUsers;
200202

201203
// Space
202-
setSpace;
204+
createSpace;
205+
206+
updateSpace;
203207

204-
getSpace;
208+
fetchSpace;
205209

206-
deleteSpace;
210+
removeSpace;
207211

208-
getSpaces;
212+
fetchSpaces;
209213

210214
disconnect;
211215

@@ -480,46 +484,50 @@ export default class {
480484
};
481485

482486
// User Apis
483-
this.setUser = (args) =>
487+
this.createUser = (args) =>
484488
this.objects.setUUIDMetadata({
485489
uuid: args.userId,
486490
data: args.data,
487491
include: args.include,
488492
});
489493

490-
this.deleteUser = (args) =>
494+
this.updateUser = this.createUser;
495+
496+
this.removeUser = (args) =>
491497
this.objects.removeUUIDMetadata({
492498
uuid: args?.userId,
493499
});
494500

495-
this.getUser = (args) =>
501+
this.fetchUser = (args) =>
496502
this.objects.getUUIDMetadata({
497503
uuid: args?.userId,
498504
include: args?.include,
499505
});
500506

501-
this.getUsers = this.objects.getAllUUIDMetadata;
507+
this.fetchUsers = this.objects.getAllUUIDMetadata;
502508

503509
// Space apis
504-
this.setSpace = (args) =>
510+
this.createSpace = (args) =>
505511
this.objects.setChannelMetadata({
506512
channel: args.spaceId,
507513
data: args.data,
508514
include: args.include,
509515
});
510516

511-
this.deleteSpace = (args) =>
517+
this.updateSpace = this.createSpace;
518+
519+
this.removeSpace = (args) =>
512520
this.objects.removeChannelMetadata({
513521
channel: args.spaceId,
514522
});
515523

516-
this.getSpace = (args) =>
524+
this.fetchSpace = (args) =>
517525
this.objects.getChannelMetadata({
518526
channel: args.spaceId,
519527
include: args.include,
520528
});
521529

522-
this.getSpaces = this.objects.getAllChannelMetadata;
530+
this.fetchSpaces = this.objects.getAllChannelMetadata;
523531

524532
this.time = timeEndpoint;
525533

0 commit comments

Comments
 (0)