Vercel Artifacts
Vercel Cache service support.
Capabilities
This service can be used to:
- stat
- read
- write
- create_dir
- delete
-
copy -
rename -
list -
presign - blocking
Configuration
access_token
: set the access_token for Rest API
You can refer to [VercelArtifactsBuilder
]'s docs for more information
Example
Via Builder
use anyhow::Result;
use opendal::services::VercelArtifacts;
use opendal::Operator;
#[tokio::main]
async fn main() -> Result<()> {
// create backend builder
let mut builder = VercelArtifacts::default();
builder.access_token("xxx");
let op: Operator = Operator::new(builder)?.finish();
Ok(())
}
Via Config
- Rust
- Node.js
- Python
use anyhow::Result;
use opendal::Operator;
use opendal::Scheme;
use std::collections::HashMap;
#[tokio::main]
async fn main() -> Result<()> {
let mut map = HashMap::new();
map.insert("access_token".to_string(), "your_access_token".to_string());
let op: Operator = Operator::via_map(Scheme::VercelArtifacts, map)?;
Ok(())
}
import { Operator } from "opendal";
async function main() {
const op = new Operator("vercel_artifacts", {
access_token: "your_access_token",
});
}
import opendal
op = opendal.Operator("vercel_artifacts",
access_token="your_access_token",
)