Skip to content

Commit bc05f71

Browse files
authored
Sprint 13 - NativeScript
Made/Proposed changes: Added fetch API instead $.ajax() and request() (REST API support for NativeScript); Chat adapted for NativeScript enviroments; Fix TypeError: Cannot read property 'statusCode' of undefined for Node env; Add stream management test cases; The MessageProxy and the DialogProxy were remove from qbChat.js to separate modules; Add link on API ref. in Readme.md;
1 parent d883d06 commit bc05f71

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1363
-14444
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ The QuickBlox JavaScript SDK provides a JavaScript library making it even easier
99

1010
[QuickBlox](https://quickblox.com) is a suite of communication features & data services (APIs, SDKs, code samples, admin panel, tutorials) which help digital agencies, mobile developers and publishers to add great communication functionality to smartphone applications like in Skype, WhatsApp, Viber.
1111

12+
Check out our [API Reference](https://quickblox.github.io/quickblox-javascript-sdk/docs/) for more detailed information about our SDK.
13+
1214
# Install
1315

1416
## Dependencies for browser
1517

1618
```html
17-
<script src="https://cdnjs.cloudflare.com/ajax/libs/quickblox/2.7.0/quickblox.min.js"></script>
19+
<script src="https://cdnjs.cloudflare.com/ajax/libs/quickblox/2.8.0/quickblox.min.js"></script>
1820
```
1921

2022
## Bower and RequireJS

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "quickblox",
33
"description": "QuickBlox JavaScript SDK",
4-
"version": "2.7.0",
4+
"version": "2.8.0",
55
"homepage": "https://quickblox.com/developers/Javascript",
66
"main": "quickblox.js",
77
"license": "Apache 2.0",

docs/QB.addressbook.html

Lines changed: 19 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -537,9 +537,9 @@ <h3 class="applicationName"><a href="index.html">QuickBlox JavaScript SDK</a></h
537537
</ul>
538538
</li>
539539

540-
<li class="item" data-name="QB.user">
540+
<li class="item" data-name="QB.users">
541541
<span class="title">
542-
<a href="QB.user.html">QB.user</a>
542+
<a href="QB.users.html">QB.users</a>
543543

544544
<span class="static">static</span>
545545

@@ -554,17 +554,17 @@ <h3 class="applicationName"><a href="index.html">QuickBlox JavaScript SDK</a></h
554554

555555
<span class="subtitle">Methods</span>
556556

557-
<li data-name="QB.user.create"><a href="QB.user.html#.create">create</a></li>
557+
<li data-name="QB.users.create"><a href="QB.users.html#.create">create</a></li>
558558

559-
<li data-name="QB.user.delete"><a href="QB.user.html#.delete">delete</a></li>
559+
<li data-name="QB.users.delete"><a href="QB.users.html#.delete">delete</a></li>
560560

561-
<li data-name="QB.user.get"><a href="QB.user.html#.get">get</a></li>
561+
<li data-name="QB.users.get"><a href="QB.users.html#.get">get</a></li>
562562

563-
<li data-name="QB.user.listUsers"><a href="QB.user.html#.listUsers">listUsers</a></li>
563+
<li data-name="QB.users.listUsers"><a href="QB.users.html#.listUsers">listUsers</a></li>
564564

565-
<li data-name="QB.user.resetPassword"><a href="QB.user.html#.resetPassword">resetPassword</a></li>
565+
<li data-name="QB.users.resetPassword"><a href="QB.users.html#.resetPassword">resetPassword</a></li>
566566

567-
<li data-name="QB.user.update"><a href="QB.user.html#.update">update</a></li>
567+
<li data-name="QB.users.update"><a href="QB.users.html#.update">update</a></li>
568568

569569
</ul>
570570
<ul class="events itemMembers">
@@ -667,8 +667,7 @@ <h4 class="name" id=".get">
667667

668668

669669
<div class="description">
670-
Retrive all contacts from address book.
671-
The method accepts 1 or 2 parameters.
670+
Retrive all contacts from address book.The method accepts 1 or 2 parameters.
672671
</div>
673672

674673

@@ -723,8 +722,7 @@ <h4 class="name" id=".get">
723722

724723

725724

726-
You could pass udid of address book or
727-
callback function if you want to get contacts from global address book.</td>
725+
You could pass udid of address book orcallback function if you want to get contacts from global address book.</td>
728726
</tr>
729727

730728

@@ -754,8 +752,7 @@ <h4 class="name" id=".get">
754752

755753

756754

757-
Callback function is used as 2nd parameter if you pass udid as 1st parameters.
758-
This callback takes 2 arguments: an error and a response.</td>
755+
Callback function is used as 2nd parameter if you pass udid as 1st parameters.This callback takes 2 arguments: an error and a response.</td>
759756
</tr>
760757

761758

@@ -804,15 +801,7 @@ <h5>Example</h5>
804801

805802

806803

807-
<pre class="prettyprint"><code>var UDID = 'D337E8A4-80AD-8ABA-9F5D-579EFF6BACAB';
808-
809-
function gotContacts(err, contacts) {
810-
contacts.forEach( (contact) => { alert(contact); })
811-
}
812-
813-
QB.addressbook.get(gotContacts);
814-
// or you could specify what address book you need by udid
815-
QB.addressbook.get(UDID, gotContacts);</code></pre>
804+
<pre class="prettyprint"><code>var UDID = 'D337E8A4-80AD-8ABA-9F5D-579EFF6BACAB';function gotContacts(err, contacts) { contacts.forEach( (contact) => { alert(contact); })}QB.addressbook.get(gotContacts);// or you could specify what address book you need by udidQB.addressbook.get(UDID, gotContacts);</code></pre>
816805

817806

818807

@@ -840,8 +829,7 @@ <h4 class="name" id=".getRegisteredUsers">
840829

841830

842831
<div class="description">
843-
Retrieve QuickBlox users that have phone numbers from your address book.
844-
The methods accepts 1 or 2 parameters.
832+
Retrieve QuickBlox users that have phone numbers from your address book.The methods accepts 1 or 2 parameters.
845833
</div>
846834

847835

@@ -926,8 +914,7 @@ <h4 class="name" id=".getRegisteredUsers">
926914

927915

928916

929-
Callback function is useв as 2nd parameter if you pass `isCompact` as 1st parameter.
930-
This callback takes 2 arguments: an error and a response.</td>
917+
Callback function is useв as 2nd parameter if you pass `isCompact` as 1st parameter.This callback takes 2 arguments: an error and a response.</td>
931918
</tr>
932919

933920

@@ -996,11 +983,7 @@ <h4 class="name" id=".uploadAddressBook">
996983

997984

998985
<div class="description">
999-
The method is used to create, update and delete contacts in address book.<br />
1000-
If contact doesn't exist in address book then it will be created. If contacts exists then it will be updated.
1001-
If pass 'destroy: 1' then the contact will be removed.<br />
1002-
<a target="_blank" href="https://quickblox.com/developers/AddressBook">Found more here</a>. <br />
1003-
The method accepts 2 or 3 parameters.
986+
The method is used to create, update and delete contacts in address book.<br />If contact doesn't exist in address book then it will be created. If contacts exists then it will be updated.If pass 'destroy: 1' then the contact will be removed.<br /><a target="_blank" href="https://quickblox.com/developers/AddressBook">Found more here</a>. <br />The method accepts 2 or 3 parameters.
1004987
</div>
1005988

1006989

@@ -1128,8 +1111,7 @@ <h4 class="name" id=".uploadAddressBook">
11281111

11291112

11301113

1131-
User's device identifier. If specified all operations will be in this context. Max length 64 symbols.
1132-
If not - it means a user has one global address book across all his devices.</td>
1114+
User's device identifier. If specified all operations will be in this context. Max length 64 symbols.If not - it means a user has one global address book across all his devices.</td>
11331115
</tr>
11341116

11351117

@@ -1159,8 +1141,7 @@ <h4 class="name" id=".uploadAddressBook">
11591141

11601142

11611143

1162-
Defines force rewrite mode.
1163-
If set 1 then all previous contacts for device context will be replaced by new ones.</td>
1144+
Defines force rewrite mode.If set 1 then all previous contacts for device context will be replaced by new ones.</td>
11641145
</tr>
11651146

11661147

@@ -1243,31 +1224,7 @@ <h5>Example</h5>
12431224

12441225

12451226

1246-
<pre class="prettyprint"><code>var people = [{
1247-
'name':'Frederic Cartwright',
1248-
'phone': '8879108395'
1249-
},
1250-
{
1251-
'phone': '8759108396',
1252-
'destroy': 1
1253-
}];
1254-
1255-
var options = {
1256-
force: 1,
1257-
udid: 'A337E8A4-80AD-8ABA-9F5D-579EFF6BACAB'
1258-
};
1259-
1260-
function addressBookSaved(err, response) {
1261-
if(err) {
1262-
1263-
} else {
1264-
console.log('All constacts saved');
1265-
}
1266-
}
1267-
1268-
QB.addressbook.uploadAddressBook(addressBookList, savedAddressBookCallback);
1269-
// or second parameters can be options
1270-
QB.addressbook.uploadAddressBook(addressBookList, options, savedAddressBookCallback);</code></pre>
1227+
<pre class="prettyprint"><code>var people = [{ 'name':'Frederic Cartwright', 'phone': '8879108395' }, { 'phone': '8759108396', 'destroy': 1 }]; var options = { force: 1, udid: 'A337E8A4-80AD-8ABA-9F5D-579EFF6BACAB' }; function addressBookSaved(err, response) { if(err) { } else { console.log('All constacts saved'); } } QB.addressbook.uploadAddressBook(addressBookList, savedAddressBookCallback); // or second parameters can be options QB.addressbook.uploadAddressBook(addressBookList, options, savedAddressBookCallback);</code></pre>
12711228

12721229

12731230

@@ -1290,7 +1247,7 @@ <h5>Example</h5>
12901247

12911248

12921249
<footer>
1293-
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Nov 09 2017 14:48:38 GMT+0200 (FLE Standard Time)
1250+
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Jan 04 2018 16:37:51 GMT+0200 (FLE Standard Time)
12941251
</footer>
12951252
</div>
12961253
</div>

docs/QB.chat.dialog.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -537,9 +537,9 @@ <h3 class="applicationName"><a href="index.html">QuickBlox JavaScript SDK</a></h
537537
</ul>
538538
</li>
539539

540-
<li class="item" data-name="QB.user">
540+
<li class="item" data-name="QB.users">
541541
<span class="title">
542-
<a href="QB.user.html">QB.user</a>
542+
<a href="QB.users.html">QB.users</a>
543543

544544
<span class="static">static</span>
545545

@@ -554,17 +554,17 @@ <h3 class="applicationName"><a href="index.html">QuickBlox JavaScript SDK</a></h
554554

555555
<span class="subtitle">Methods</span>
556556

557-
<li data-name="QB.user.create"><a href="QB.user.html#.create">create</a></li>
557+
<li data-name="QB.users.create"><a href="QB.users.html#.create">create</a></li>
558558

559-
<li data-name="QB.user.delete"><a href="QB.user.html#.delete">delete</a></li>
559+
<li data-name="QB.users.delete"><a href="QB.users.html#.delete">delete</a></li>
560560

561-
<li data-name="QB.user.get"><a href="QB.user.html#.get">get</a></li>
561+
<li data-name="QB.users.get"><a href="QB.users.html#.get">get</a></li>
562562

563-
<li data-name="QB.user.listUsers"><a href="QB.user.html#.listUsers">listUsers</a></li>
563+
<li data-name="QB.users.listUsers"><a href="QB.users.html#.listUsers">listUsers</a></li>
564564

565-
<li data-name="QB.user.resetPassword"><a href="QB.user.html#.resetPassword">resetPassword</a></li>
565+
<li data-name="QB.users.resetPassword"><a href="QB.users.html#.resetPassword">resetPassword</a></li>
566566

567-
<li data-name="QB.user.update"><a href="QB.user.html#.update">update</a></li>
567+
<li data-name="QB.users.update"><a href="QB.users.html#.update">update</a></li>
568568

569569
</ul>
570570
<ul class="events itemMembers">
@@ -654,7 +654,7 @@ <h4 class="name" id=".create">
654654

655655

656656
<div class="tag-source">
657-
modules/qbChat.js, line 2207
657+
modules/chat/qbDialog.js, line 47
658658
</div>
659659

660660
</div>
@@ -793,7 +793,7 @@ <h4 class="name" id=".delete">
793793

794794

795795
<div class="tag-source">
796-
modules/qbChat.js, line 2255
796+
modules/chat/qbDialog.js, line 97
797797
</div>
798798

799799
</div>
@@ -958,7 +958,7 @@ <h4 class="name" id=".list">
958958

959959

960960
<div class="tag-source">
961-
modules/qbChat.js, line 2182
961+
modules/chat/qbDialog.js, line 22
962962
</div>
963963

964964
</div>
@@ -1097,7 +1097,7 @@ <h4 class="name" id=".update">
10971097

10981098

10991099
<div class="tag-source">
1100-
modules/qbChat.js, line 2233
1100+
modules/chat/qbDialog.js, line 73
11011101
</div>
11021102

11031103
</div>
@@ -1265,7 +1265,7 @@ <h4 class="name" id=".update">
12651265

12661266

12671267
<footer>
1268-
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Nov 09 2017 14:48:38 GMT+0200 (FLE Standard Time)
1268+
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Jan 04 2018 16:37:51 GMT+0200 (FLE Standard Time)
12691269
</footer>
12701270
</div>
12711271
</div>

0 commit comments

Comments
 (0)