@nomad-media/public 1.1.12 → 1.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -14
- package/dist/nomad-media-sdk-debug.js +1499 -0
- package/dist/nomad-media-sdk.min.js +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,28 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
This package contains the public version of the Nomad Media SDK. It includes all of the media methods of the SDK.
|
|
1
|
+
## Prerequisites
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
- Node.js 12.0.0
|
|
3
|
+
- Node package manager (npm).
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
> 📘 Note
|
|
6
|
+
>
|
|
7
|
+
> You can download npm [here](https://nodejs.org/en/download).
|
|
9
8
|
|
|
9
|
+
## Setup
|
|
10
|
+
|
|
11
|
+
To use the Nomad SDK, download the @nomad-media npm. There are two versions, the full version which includes all of the Nomad-Media endpoints, and the public version which only includes the media endpoints.
|
|
12
|
+
|
|
13
|
+
To install the full version, use the following command:
|
|
14
|
+
```shell
|
|
15
|
+
npm install @nomad-media/full
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
To install the public version, use the following command:
|
|
10
19
|
```shell
|
|
11
20
|
npm install @nomad-media/public
|
|
12
21
|
```
|
|
13
22
|
|
|
14
|
-
Then to import it, you can either use the default version, or the debug version. The difference is that the debug version isn't compressed and has more documentation and named parameters.
|
|
23
|
+
Then to import it, you can either use the default version, or the debug version. The difference is that the debug version isn't compressed and has more documentation and named parameters. Both full and public have a debug version. Currently the debug version's tooltips don't show up. This is an issue with npm.
|
|
15
24
|
|
|
16
25
|
To use the default version use:
|
|
17
26
|
|
|
18
27
|
```javascript
|
|
19
|
-
import NomadMediaSDK from "@nomad-media/
|
|
28
|
+
import NomadMediaSDK from "@nomad-media/full";
|
|
20
29
|
```
|
|
21
30
|
|
|
22
31
|
To use the debug version user:
|
|
23
32
|
|
|
24
33
|
```javascript
|
|
25
|
-
import NomadMediaSDK from "@nomad-media/
|
|
34
|
+
import NomadMediaSDK from "@nomad-media/full/debug";
|
|
26
35
|
```
|
|
27
36
|
|
|
28
37
|
To initialize the sdk, call the NomadMediaSDK class as shown below:
|
|
@@ -41,22 +50,39 @@ const config = {
|
|
|
41
50
|
"password": "password",
|
|
42
51
|
"serviceApiUrl": "serverApiUrl",
|
|
43
52
|
"apiType": "admin",
|
|
44
|
-
"debugMode": true
|
|
53
|
+
"debugMode": true,
|
|
54
|
+
"singleton": false
|
|
45
55
|
};
|
|
46
56
|
```
|
|
47
|
-
serviceApiUrl: Specifies the url of the server you are trying to connect to.
|
|
48
57
|
|
|
49
58
|
apiType: Specifies whether the function you are trying to run is **admin** or **portal**.
|
|
50
59
|
|
|
51
60
|
debugMode: Specifies when running functions, whether of not to print api call information.
|
|
52
61
|
|
|
62
|
+
singleton: Whether or not to only create one class instance.
|
|
63
|
+
|
|
64
|
+
Place the config in a file called config.js and import it into your project.
|
|
65
|
+
|
|
53
66
|
You are now ready to use the SDK in your project.
|
|
54
67
|
|
|
55
68
|
> 📘 Contact: Make sure to contact Nomad Media support to get username, password, and url for your enviromnent.
|
|
56
69
|
|
|
57
70
|
> 🚧 Make sure to keep your configuration options secret and do not share them publicly.
|
|
58
71
|
|
|
59
|
-
##
|
|
72
|
+
## Upgrading NPM
|
|
73
|
+
|
|
74
|
+
To upgrade the npm, use the following command:
|
|
75
|
+
|
|
76
|
+
```shell
|
|
77
|
+
npm update @nomad-media/full
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Nomad SDK References
|
|
81
|
+
|
|
82
|
+
An overview of all of the Nomad SDK methods. Includes prameter details for the methods. Scroll down to the Nomad SDK section.
|
|
83
|
+
|
|
84
|
+
[Nomad SDK References](https://developer.nomad-cms.com/reference)
|
|
85
|
+
|
|
86
|
+
## Nomad SDK NPM Samples
|
|
60
87
|
|
|
61
|
-
|
|
62
|
-
- [Nomad SDK NPM Samples](https://github.com/Nomad-Media/samples-js)
|
|
88
|
+
[Nomad SDK NPM Samples](https://github.com/Nomad-Media/samples-js)
|