Skip to content

Commit 9a7e85a

Browse files
committed
Merge pull request #8 from avoscloud/0.4.0
Upgrade rest api version to 1.1
2 parents 13c3a72 + 2053d03 commit 9a7e85a

File tree

3 files changed

+32
-22
lines changed

3 files changed

+32
-22
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@ $ npm install avoscloud-sdk
1313
* [JavaScript SDK 开发指南](http://avoscloud.com/docs/js_guide.html)
1414
* [JavaScript SDK API文档](http://avoscloud.com/docs/api/javascript/index.html)
1515
* [云代码开发指南](http://avoscloud.com/docs/cloud_code_guide.html)
16+
17+
18+
# 协议
19+
20+
[MIT License](http://opensource.org/licenses/MIT)

lib/av.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
/*!
22
* AVOSCloud JavaScript SDK
3-
* Version: 0.3.7
3+
* Version: 0.4.0
44
* Built: Mon Jun 03 2013 13:45:00
55
* http://avoscloud.com
66
*
77
* Copyright 2013 AV, Inc.
8-
* The AV JavaScript SDK is freely distributable under the MIT license.
8+
* The AVOS Cloud JavaScript SDK is freely distributable under the MIT license.
99
*
1010
* Includes: Underscore.js
1111
* Copyright 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
1212
* Released under the MIT license.
1313
*/
1414
(function(root) {
1515
root.AV = root.AV || {};
16-
root.AV.VERSION = "js0.3.7";
16+
root.AV.VERSION = "js0.4.0";
1717
}(this));
1818
// Underscore.js 1.4.4
1919
// http://underscorejs.org
@@ -1603,7 +1603,7 @@
16031603
if (url.charAt(url.length - 1) !== "/") {
16041604
url += "/";
16051605
}
1606-
url += "1/" + route;
1606+
url += "1.1/" + route;
16071607
if (className) {
16081608
url += "/" + className;
16091609
}
@@ -4370,7 +4370,7 @@
43704370
self._name = response.name;
43714371
self._url = response.url;
43724372
self.id = response.objectId;
4373-
if(response.size)
4373+
if(response.size)
43744374
self._metaData.size = response.size;
43754375
return self;
43764376
});
@@ -5800,7 +5800,7 @@
58005800
var json = object._getSaveJSON();
58015801
var method = "POST";
58025802

5803-
var path = "/1/classes/" + object.className;
5803+
var path = "/1.1/classes/" + object.className;
58045804
if (object.id) {
58055805
path = path + "/" + object.id;
58065806
method = "PUT";

package.json

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
{
2-
"name": "avoscloud-sdk",
3-
"version": "0.3.7",
4-
"main": "./lib/av.js",
5-
"description": "AVOSCloud JavaScript SDK.",
6-
"dependencies": {
7-
"xmlhttprequest" : "1.6.0",
8-
"qiniu": "6.1.3"
9-
},
10-
"devDependencies": {
11-
"mocha":"1.9.0",
12-
"expect.js ":"0.2.0"
13-
},
14-
"author" : {
15-
"name" : "dennis zhuang",
16-
"email" : "[email protected]"
17-
}
2+
"name": "avoscloud-sdk",
3+
"version": "0.4.0",
4+
"main": "./lib/av.js",
5+
"description": "AVOSCloud JavaScript SDK.",
6+
"repository": {
7+
"type" : "git",
8+
"url" : "https://github.com/avoscloud/javascript-sdk"
9+
},
10+
"dependencies": {
11+
"xmlhttprequest" : "1.6.0",
12+
"qiniu": "6.1.3"
13+
},
14+
"devDependencies": {
15+
"mocha":"1.9.0",
16+
"expect.js ":"0.2.0"
17+
},
18+
"license" : "MIT",
19+
"author" : {
20+
"name" : "dennis zhuang",
21+
"email" : "[email protected]"
22+
}
1823
}

0 commit comments

Comments
 (0)