Skip to content

Commit

Permalink
chore: rebuild project due to codegen change (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed May 31, 2024
1 parent b538159 commit 5cee0e9
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const mux = new Mux({
async function main() {
const asset = await mux.video.assets.create({
input: [{ url: 'https://storage.googleapis.com/muxdemofiles/mux-video-intro.mp4' }],
playback_policy: ['public'],
});

console.log(asset.id);
Expand All @@ -56,7 +55,6 @@ const mux = new Mux({
async function main() {
const params: Mux.Video.AssetCreateParams = {
input: [{ url: 'https://storage.googleapis.com/muxdemofiles/mux-video-intro.mp4' }],
playback_policy: ['public'],
};
const asset: Mux.Video.Asset = await mux.video.assets.create(params);
}
Expand Down Expand Up @@ -346,19 +344,13 @@ You can also use the `.withResponse()` method to get the raw `Response` along wi
const mux = new Mux();

const response = await mux.video.assets
.create({
input: [{ url: 'https://storage.googleapis.com/muxdemofiles/mux-video-intro.mp4' }],
playback_policy: ['public'],
})
.create({ input: [{ url: 'https://storage.googleapis.com/muxdemofiles/mux-video-intro.mp4' }] })
.asResponse();
console.log(response.headers.get('X-My-Header'));
console.log(response.statusText); // access the underlying Response object

const { data: asset, response: raw } = await mux.video.assets
.create({
input: [{ url: 'https://storage.googleapis.com/muxdemofiles/mux-video-intro.mp4' }],
playback_policy: ['public'],
})
.create({ input: [{ url: 'https://storage.googleapis.com/muxdemofiles/mux-video-intro.mp4' }] })
.withResponse();
console.log(raw.headers.get('X-My-Header'));
console.log(asset.id);
Expand Down

0 comments on commit 5cee0e9

Please sign in to comment.