@nomad-media/full 1.1.3 → 1.1.4
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
CHANGED
|
@@ -1,27 +1,62 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
# Nomad Media Full
|
|
2
|
+
This package contains the full version of the Nomad Media SDK. It includes all the methods of the SDK.
|
|
3
|
+
|
|
4
|
+
## Minimum Requirements
|
|
5
|
+
- Node.js 12.0.0
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
To use the Nomad SDK, download the npm nomad-media-npm.
|
|
9
|
+
|
|
10
|
+
```shell
|
|
11
|
+
npm install @nomad-media/full
|
|
12
|
+
```
|
|
13
|
+
|
|
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.
|
|
15
|
+
|
|
16
|
+
To use the default version use:
|
|
17
|
+
|
|
18
|
+
```javascript
|
|
19
|
+
import NomadMediaSDK from "@nomad-media/full";
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
To use the debug version user:
|
|
23
|
+
|
|
24
|
+
```javascript
|
|
25
|
+
import NomadMediaSDK from "@nomad-media/full/debug";
|
|
5
26
|
```
|
|
6
27
|
|
|
7
|
-
|
|
28
|
+
To initialize the sdk, call the NomadMediaSDK class as shown below:
|
|
8
29
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
//registry.npmjs.org/:_authToken=<your-token>
|
|
30
|
+
```javascript
|
|
31
|
+
const SDK = NomadMediaSDK(config);
|
|
12
32
|
```
|
|
13
33
|
|
|
14
|
-
##
|
|
15
|
-
|
|
16
|
-
|
|
34
|
+
## Configure Environmental Variables
|
|
35
|
+
|
|
36
|
+
Follow this format for the config:
|
|
17
37
|
|
|
18
|
-
## Testing
|
|
19
|
-
To test a specific file in the test directory, run the following command in the root directory of the project:
|
|
20
|
-
```bash
|
|
21
|
-
npm test test/<file-name>
|
|
22
38
|
```
|
|
39
|
+
const config = {
|
|
40
|
+
"username": "username",
|
|
41
|
+
"password": "password",
|
|
42
|
+
"serviceApiUrl": "serverApiUrl",
|
|
43
|
+
"apiType": "admin",
|
|
44
|
+
"debugMode": true
|
|
45
|
+
};
|
|
46
|
+
```
|
|
47
|
+
serviceApiUrl: Specifies the url of the server you are trying to connect to.
|
|
48
|
+
|
|
49
|
+
apiType: Specifies whether the function you are trying to run is **admin** or **portal**.
|
|
50
|
+
|
|
51
|
+
debugMode: Specifies when running functions, whether of not to print api call information.
|
|
52
|
+
|
|
53
|
+
You are now ready to use the SDK in your project.
|
|
54
|
+
|
|
55
|
+
> 📘 Contact: Make sure to contact Nomad Media support to get username, password, and url for your enviromnent.
|
|
56
|
+
|
|
57
|
+
> 🚧 Make sure to keep your configuration options secret and do not share them publicly.
|
|
58
|
+
|
|
59
|
+
## Nomad SDK Documentation
|
|
23
60
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
npm test
|
|
27
|
-
```
|
|
61
|
+
- [Nomad SDK Modules](https://developer.nomad-cms.com/docs/nomad-api-modules)
|
|
62
|
+
- [Nomad SDK NPM Samples](https://github.com/Nomad-Media/samples-js)
|
package/package.json
CHANGED
|
@@ -1,37 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nomad-media/full",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Nomad Media NPM",
|
|
5
|
-
"main": "nomad-media-sdk.min.js",
|
|
5
|
+
"main": "dist/nomad-media-sdk.min.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
|
-
".": "./nomad-media-sdk.min.js",
|
|
9
|
-
"./debug": "./nomad-media-sdk-debug.js"
|
|
8
|
+
".": "./dist/nomad-media-sdk.min.js",
|
|
9
|
+
"./debug": "./dist/nomad-media-sdk-debug.js"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
|
-
"nomad-media-sdk.min.js",
|
|
13
|
-
"nomad-media-sdk-debug.js",
|
|
14
|
-
"README
|
|
12
|
+
"dist/nomad-media-sdk.min.js",
|
|
13
|
+
"dist/nomad-media-sdk-debug.js",
|
|
14
|
+
"README.md"
|
|
15
15
|
],
|
|
16
|
-
"scripts": {
|
|
17
|
-
"test": "mocha",
|
|
18
|
-
"docs": "swagger-jsdoc -d ./swaggerDef.cjs -o ./swaggerOutput.json ./sdk.js"
|
|
19
|
-
},
|
|
20
16
|
"dependencies": {
|
|
21
|
-
"chai": "^4.3.10",
|
|
22
|
-
"chai-as-promised": "^7.1.1",
|
|
23
17
|
"deep-equal": "^2.2.2"
|
|
24
|
-
},
|
|
25
|
-
"devDependencies": {
|
|
26
|
-
"grunt": "^1.6.1",
|
|
27
|
-
"grunt-contrib-clean": "^2.0.1",
|
|
28
|
-
"grunt-contrib-concat": "^2.1.0",
|
|
29
|
-
"grunt-contrib-uglify": "^5.2.2",
|
|
30
|
-
"grunt-eslint": "^24.3.0",
|
|
31
|
-
"grunt-text-replace": "^0.4.0",
|
|
32
|
-
"swagger-jsdoc": "^6.2.8"
|
|
33
|
-
},
|
|
34
|
-
"engines": {
|
|
35
|
-
"node": ">=12.0.0"
|
|
36
18
|
}
|
|
37
19
|
}
|
package/README-npm.md
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# Minimum Requirements
|
|
3
|
-
- Node.js 12.0.0
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
To use the Nomad SDK, download the npm nomad-media-npm.
|
|
7
|
-
|
|
8
|
-
```shell
|
|
9
|
-
npm install @nomad-media/nomad-media
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
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.
|
|
13
|
-
|
|
14
|
-
To use the default version use:
|
|
15
|
-
|
|
16
|
-
```javascript
|
|
17
|
-
import NomadMediaSDK from "@nomad-media/nomad-media";
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
To use the debug version user:
|
|
21
|
-
|
|
22
|
-
```javascript
|
|
23
|
-
import NomadMediaSDK from "@nomad-media/nomad-media/debug";
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
To initialize the sdk, call the NomadMediaSDK class as shown below:
|
|
27
|
-
|
|
28
|
-
```javascript
|
|
29
|
-
const SDK = NomadMediaSDK(config);
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Configure Environmental Variables
|
|
33
|
-
|
|
34
|
-
Follow this format for the config:
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
const config = {
|
|
38
|
-
"username": "username",
|
|
39
|
-
"password": "password",
|
|
40
|
-
"serviceApiUrl": "serverApiUrl",
|
|
41
|
-
"apiType": "admin",
|
|
42
|
-
"debugMode": true
|
|
43
|
-
};
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
apiType: Specifies whether the function you are trying to run is **admin** or **portal**.
|
|
47
|
-
|
|
48
|
-
debugMode: Specifies when running functions, whether of not to print api call information.
|
|
49
|
-
|
|
50
|
-
You are now ready to use the SDK in your project.
|
|
51
|
-
|
|
52
|
-
> 📘 Contact: Make sure to contact Nomad Media support to get username, password, and url for your enviromnent.
|
|
53
|
-
|
|
54
|
-
> 🚧 Make sure to keep your configuration options secret and do not share them publicly.
|
|
55
|
-
|
|
56
|
-
## Nomad SDK API Guide
|
|
57
|
-
|
|
58
|
-
An overview of all of the Nomad SDK methods. Includes prameter details for the methods.
|
|
59
|
-
|
|
60
|
-
[Nomad SDK References](https://developer.nomad-cms.com/docs/nomad-api-modules)
|
|
61
|
-
|
|
62
|
-
## Nomad SDK NPM Samples
|
|
63
|
-
|
|
64
|
-
[Nomad SDK NPM Samples](https://github.com/Nomad-Media/samples-js)
|
|
File without changes
|
|
File without changes
|