
Security News
pnpm 10.16 Adds New Setting for Delayed Dependency Updates
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
@byteplus/vcloud-sdk-nodejs
Advanced tools
npm install -S @byteplus/vcloud-sdk-nodejs
Available in three settings
import { vodOpenapi } from "@byteplus/vcloud-sdk-nodejs";
// Use the default service instance.
const vodService = vodOpenapi.defaultService;
// set aksk
vodService.setAccessKeyId(AccessKeyId);
vodService.setSecretKey(SecretKey);
// If you use sts to request, you need to set up `SessionToken` after aksk is set
vodService.setSessionToken(SessionToken);
BYTEPLUS_ACCESSKEY="your ak" BYTEPLUS_SECRETKEY="your sk"
Put it in ~/.byteplus/config
in json format, the format is:
{"BYTEPLUS_ACCESSKEY":"your ak","BYTEPLUS_SECRETKEY":"your sk"}
Take the ListUsers API of the iam service as an example
import { vodOpenapi } from "@byteplus/vcloud-sdk-nodejs";
async function main(AccessKeyId, SecretKey) {
// Use the default service instance.
const vodService = vodOpenapi.defaultService;
// set aksk
vodService.setAccessKeyId(AccessKeyId);
vodService.setSecretKey(SecretKey);
// Request OpenAPI
const usersResponse = await vodService.ListUsers({
Limit: 10,
Offset: 0,
});
}
import { Signer } from "@byteplus/vcloud-sdk-nodejs";
// http request data
const openApiRequestData: RequestObj = {
region: "ap-singapore-1",
method: "GET",
// [optional] http request url query
params: {},
// http request headers
headers: {},
// [optional] http request body
body: "",
};
const signer = new Signer(openApiRequestData, "vod");
// sign
signer.addAuthorization({ accessKeyId, secretKey, sessionToken });
// Print signed headers
console.log(openApiRequestData.headers);
const openApiRequestData: RequestObj = {
method: "POST",
region: "ap-singapore-1",
params: {
Action: "UpdateSubtitleStatus",
Version: "2023-01-01",
Vid: "your vid",
Status: "your status",
FileIds: "your fileIds",
Formats: "your formats",
Languages: "your languages",
},
};
const credentials: Credentials = {
accessKeyId: BYTEPLUS_ACCESSKEY,
secretKey: BYTEPLUS_SECRETKEY,
sessionToken: "",
};
const signer = new Signer(openApiRequestData, "vod");
const signedQueryString = signer.getSignUrl(credentials);
FAQs
Vcloud Byteplus OpenAPI SDK of NodeJs
We found that @byteplus/vcloud-sdk-nodejs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.