Comparing version 2.1.1 to 2.2.0
@@ -207,2 +207,3 @@ 'use strict'; | ||
* @param {Boolean} [options.encode] if we should url encode the actions | ||
* @param {String} [options.format] image format to use | ||
* @return {String} | ||
@@ -215,3 +216,3 @@ */ | ||
var url = this.getUrl(printf('/users/%s/images/%s.jpg', this.username, id), !options.https); | ||
var url = this.getUrl(printf('/users/%s/images/%s.%s', this.username, id, options.format || 'jpg'), !options.https); | ||
if (actions) { | ||
@@ -218,0 +219,0 @@ url += '?' + qs.stringify({ t: actions }, { encode: false }); |
{ | ||
"name": "ass-client", | ||
"version": "2.1.1", | ||
"version": "2.2.0", | ||
"description": "Aptoma Smooth Storage client", | ||
@@ -43,6 +43,6 @@ "main": "index.js", | ||
"mocha": "^1.21.4", | ||
"nock": "^2.16.1", | ||
"nock": "^13.3.0", | ||
"phantomjs": "^1.9.18", | ||
"readable-stream": "^2.0.3", | ||
"release-it": "0.0.11", | ||
"release-it": "^15.10.1", | ||
"sinon-browser-only": "^1.12.1", | ||
@@ -55,2 +55,2 @@ "through": "^2.3.8", | ||
} | ||
} | ||
} |
@@ -119,3 +119,3 @@ /* jshint mocha: true */ | ||
} else { | ||
nock('https://ass.com').get('/timeout').socketDelay(2000).reply(200); | ||
nock('https://ass.com').get('/timeout').delayConnection(2000).reply(200); | ||
} | ||
@@ -310,2 +310,7 @@ | ||
}); | ||
it('should support image format option', function () { | ||
var url = this.client.createImageUrl(1, null, {format: 'webp'}); | ||
assert.equal(url, 'http://ass.com/users/foobar/images/1.webp?accessToken=f3d8cd259e57148f9360ef8f20653b2e44cd9ff61547de51c2b887adb54e2bcb'); | ||
}); | ||
}); | ||
@@ -312,0 +317,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77161
16
960