screenshotone-api-sdk
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -53,3 +53,3 @@ /** | ||
*/ | ||
store(options: AnimateOptions | TakeOptions, path: string, bucket?: string, acl?: "public-read" | "", storageClass?: string): Promise<{ | ||
store(options: AnimateOptions | TakeOptions, path: string, bucket?: string, acl?: "public-read" | "", storageClass?: string, accessKeyId?: string, secretAccessKey?: string): Promise<{ | ||
bucket: string | null; | ||
@@ -316,2 +316,10 @@ key: string | null; | ||
/** | ||
* Access key ID. It overrides the one specified in the dashboard configuration. | ||
*/ | ||
storageAccessKeyId(accessKeyId: string): TakeOptions; | ||
/** | ||
* Secret access key. It overrides the one specified in the dashboard configuration. | ||
*/ | ||
storageSecretAccessKey(secretAccessKey: string): TakeOptions; | ||
/** | ||
* Storage class allows you to specify the object storage class. | ||
@@ -318,0 +326,0 @@ */ |
@@ -114,3 +114,3 @@ "use strict"; | ||
*/ | ||
async store(options, path, bucket, acl, storageClass) { | ||
async store(options, path, bucket, acl, storageClass, accessKeyId, secretAccessKey) { | ||
options.store(true).storagePath(path).responseType("empty"); | ||
@@ -126,2 +126,8 @@ if (bucket) { | ||
} | ||
if (accessKeyId) { | ||
options.storageAccessKeyId(accessKeyId); | ||
} | ||
if (secretAccessKey) { | ||
options.storageSecretAccessKey(secretAccessKey); | ||
} | ||
const url = options instanceof TakeOptions | ||
@@ -575,2 +581,16 @@ ? await this.generateSignedTakeURL(options) | ||
/** | ||
* Access key ID. It overrides the one specified in the dashboard configuration. | ||
*/ | ||
storageAccessKeyId(accessKeyId) { | ||
this.put("storage_access_key_id", accessKeyId); | ||
return this; | ||
} | ||
/** | ||
* Secret access key. It overrides the one specified in the dashboard configuration. | ||
*/ | ||
storageSecretAccessKey(secretAccessKey) { | ||
this.put("storage_secret_access_key", secretAccessKey); | ||
return this; | ||
} | ||
/** | ||
* Storage class allows you to specify the object storage class. | ||
@@ -577,0 +597,0 @@ */ |
{ | ||
"name": "screenshotone-api-sdk", | ||
"homepage": "https://screenshotone.com", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "Use ScreenshotOne.com API to generate screenshots of any website.", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -142,3 +142,5 @@ import Big from "big.js"; | ||
acl?: "public-read" | "", | ||
storageClass?: string | ||
storageClass?: string, | ||
accessKeyId?: string, | ||
secretAccessKey?: string, | ||
): Promise<{ bucket: string | null; key: string | null }> { | ||
@@ -156,2 +158,8 @@ options.store(true).storagePath(path).responseType("empty"); | ||
} | ||
if (accessKeyId) { | ||
options.storageAccessKeyId(accessKeyId) | ||
} | ||
if (secretAccessKey) { | ||
options.storageSecretAccessKey(secretAccessKey) | ||
} | ||
@@ -730,2 +738,20 @@ const url = | ||
/** | ||
* Access key ID. It overrides the one specified in the dashboard configuration. | ||
*/ | ||
storageAccessKeyId(accessKeyId: string): TakeOptions { | ||
this.put("storage_access_key_id", accessKeyId); | ||
return this; | ||
} | ||
/** | ||
* Secret access key. It overrides the one specified in the dashboard configuration. | ||
*/ | ||
storageSecretAccessKey(secretAccessKey: string): TakeOptions { | ||
this.put("storage_secret_access_key", secretAccessKey); | ||
return this; | ||
} | ||
/** | ||
* Storage class allows you to specify the object storage class. | ||
@@ -1200,3 +1226,3 @@ */ | ||
return this | ||
return this; | ||
} | ||
@@ -1210,3 +1236,3 @@ | ||
return this | ||
return this; | ||
} | ||
@@ -1213,0 +1239,0 @@ |
101112
2790