Skip to content

Commit bb48355

Browse files
committed
Examples
1 parent 2f63d3e commit bb48355

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Mux Node SDK
22

3-
This library is intended to provide Mux API convenience methods for applications written in server-side Javascript.
3+
Official Mux API wrapper for Node projects.
44

5-
__Please note__ that this package uses Mux access tokens and secret keys and is intended to be used in server-side code only.
5+
This library is intended to provide Mux API convenience methods for applications written in server-side Javascript. __Please note__ that this package uses Mux access tokens and secret keys and is intended to be used in server-side code only.
6+
7+
Not familiar with Mux? Check out https://mux.com/ for more information.
68

79
## Documentation
810

@@ -32,7 +34,12 @@ const { Video, Data } = muxClient;
3234
As an example, you can create a Mux asset and playback ID by using the below functions on your Video instance.
3335
```
3436
// Create an asset
35-
Video.assets.create({ input: 'https://storage.googleapis.com/muxdemofiles/mux-video-intro.mp4' });
37+
let assetId;
38+
Video.assets.create({ input: 'https://storage.googleapis.com/muxdemofiles/mux-video-intro.mp4' })
39+
.then((res) => {
40+
const { data } = res.data;
41+
assetId = data.id;
42+
});
3643
```
3744

3845
```

manual/index.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Mux Node SDK
22

3-
This library is intended to provide Mux API convenience methods for applications written in server-side Javascript.
3+
Official Mux API wrapper for Node projects.
44

5-
__Please note__ that this package uses Mux access tokens and secret keys and is intended to be used in server-side code only.
5+
This library is intended to provide Mux API convenience methods for applications written in server-side Javascript. __Please note__ that this package uses Mux access tokens and secret keys and is intended to be used in server-side code only.
6+
7+
Not familiar with Mux? Check out https://mux.com/ for more information.
68

79
## Documentation
810

@@ -32,7 +34,12 @@ const { Video, Data } = muxClient;
3234
As an example, you can create a Mux asset and playback ID by using the below functions on your Video instance.
3335
```
3436
// Create an asset
35-
Video.assets.create({ input: 'https://storage.googleapis.com/muxdemofiles/mux-video-intro.mp4' });
37+
let assetId;
38+
Video.assets.create({ input: 'https://storage.googleapis.com/muxdemofiles/mux-video-intro.mp4' })
39+
.then((res) => {
40+
const { data } = res.data;
41+
assetId = data.id;
42+
});
3643
```
3744

3845
```

0 commit comments

Comments
 (0)