Skip to content

Commit

Permalink
Release 2.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
rsonghuster committed Sep 19, 2018
1 parent 8012081 commit 52f7706
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 65 deletions.
5 changes: 5 additions & 0 deletions History.md
@@ -1,4 +1,9 @@

2.0.5 / 2018-09-19
==================

* add custom domain support and fix bad case

2.0.3 / 2018-05-24
==================

Expand Down
141 changes: 77 additions & 64 deletions es5/client.js
Expand Up @@ -112,7 +112,6 @@ var Client = function () {

headers = Object.assign(this.buildHeaders(), this.headers, headers);


if (body) {
debug('request body: %s', body);
buff = null;
Expand Down Expand Up @@ -633,97 +632,111 @@ var Client = function () {
}

/**
* 获得Header 签名
*
* @param {String} accessKeyID
* @param {String} accessKeySecret
* @param {String} method : GET/POST/PUT/DELETE/HEAD
* @param {String} path
* @param {json} headers : {headerKey1 : 'headValue1'}
*/
* 创建CustomDomain
*
* Options:
* - protocol
* - routeConfig
*
* @param {String} domainName 域名
* @param {Object} options 选项,optional
* @return {Promise} 返回 Object(包含headers和data属性[CustomDomainResponse])
*/

}, {
key: 'createCustomDomain',
value: function createCustomDomain(domainName, options = {}, headers) {
value: function createCustomDomain(domainName) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var headers = arguments[2];

return this.post('/custom-domains', Object.assign({
domainName,
domainName
}, options), headers);
}

/**
* 创建CustomDomain
*
* Options:
* - protocol
* - routeConfig
*
* @param {String} domainName 域名
* @param {Object} options 选项,optional
* @return {Promise} 返回 Object(包含headers和data属性[CustomDomainResponse])
*/
/**
* 获取CustomDomain列表
*
* Options:
* - limit
* - prefix
* - startKey
* - nextToken
*
* @param {Object} options 选项,optional
* @return {Promise} 返回 Object(包含headers和data属性[CustomDomain 列表])
*/

}, {
key: 'updateCustomDomain',
value: function updateCustomDomain(domainName, options = {}, headers) {
return this.put(`/custom-domains/${domainName}`, options, headers);
key: 'listCustomDomains',
value: function listCustomDomains() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var headers = arguments[1];

return this.get('/custom-domains', options, headers);
}

/**
* 更新CustomDomain信息
*
* Options:
* - protocol
* - routeConfig
*
* @param {String} domainName
* @param {Object} options 选项,optional
* @return {Promise} 返回 Object(包含headers和data属性[CustomDomainResponse])
*/
* 获取CustomDomain信息
*
* @param {String} domainName
* @return {Promise} 返回 Object(包含headers和data属性[CustomDomain 信息])
*/

}, {
key: 'getCustomDomain',
value: function getCustomDomain(domainName, headers) {
return this.get(`/custom-domains/${domainName}`, null, headers);
}

/**
* 获取CustomDomain信息
*
* @param {String} domainName
* @return {Promise} 返回 Object(包含headers和data属性[CustomDomain 信息])
*/
* 更新CustomDomain信息
*
* Options:
* - protocol
* - routeConfig
*
* @param {String} domainName
* @param {Object} options 选项,optional
* @return {Promise} 返回 Object(包含headers和data属性[Service 信息])
*/

}, {
key: 'deleteCustomDomain',
value: function deleteCustomDomain(domainName, options = {}, headers) {
return this.delete(`/custom-domains/${domainName}`, null, options, headers);
key: 'updateCustomDomain',
value: function updateCustomDomain(domainName) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var headers = arguments[2];

return this.put(`/custom-domains/${domainName}`, options, headers);
}

/**
* 删除CustomDomain
*
* @param {String} domainName
* @return {Promise} 返回 Object(包含headers和data属性)
*/
* 删除CustomDomain
*
* @param {String} domainName
* @return {Promise} 返回 Object(包含headers和data属性)
*/

}, {
key: 'listCustomDomains',
value: function listCustomDomain(options = {}, headers) {
return this.get('/custom-domains', options, headers);
key: 'deleteCustomDomain',
value: function deleteCustomDomain(domainName) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var headers = arguments[2];

return this.delete(`/custom-domains/${domainName}`, null, options, headers);
}

/**
* 获取CustomDomain列表
*
* Options:
* - limit
* - prefix
* - startKey
* - nextToken
*
* @param {Object} options 选项,optional
* @return {Promise} 返回 Object(包含headers和data属性[CustomDomain 列表])
*/

},], [{
* 获得Header 签名
*
* @param {String} accessKeyID
* @param {String} accessKeySecret
* @param {String} method : GET/POST/PUT/DELETE/HEAD
* @param {String} path
* @param {json} headers : {headerKey1 : 'headValue1'}
*/

}], [{
key: 'getSignature',
value: function getSignature(accessKeyID, accessKeySecret, method, path, headers, queries) {
var stringToSign = helper.composeStringToSign(method, path, headers, queries);
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "@alicloud/fc2",
"version": "2.0.4",
"version": "2.0.5",
"description": "Aliyun Function Compute API SDK2",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 52f7706

Please sign in to comment.