forked from contentstack/contentstack-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontentstack.js
More file actions
executable file
·39 lines (33 loc) · 917 Bytes
/
contentstack.js
File metadata and controls
executable file
·39 lines (33 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import Stack from "./stack";
import CacheProvider from './cache-provider/index';
import ContentstackRegion from "./contentstackregion";
/**
* @class
Contentstack
* @description Creates an instance of `Contentstack`.
* @instance
*/
class Contentstack {
constructor(){
/**
* @memberOf Contentstack
* @description CachePolicy contains different cache policies constants.
* @example
* Contentstack.CachePolicy.IGNORE_CACHE
* Contentstack.CachePolicy.ONLY_NETWORK
* Contentstack.CachePolicy.CACHE_ELSE_NETWORK
* Contentstack.CachePolicy.NETWORK_ELSE_CACHE
* Contentstack.CachePolicy.CACHE_THEN_NETWORK
*/
this.CachePolicy = CacheProvider.policies;
this.Region = ContentstackRegion;
this.Utils = require('@contentstack/utils');
}
/**
* @memberOf Contentstack
*/
Stack(...stack_arguments){
return new Stack(...stack_arguments);
}
}
module.exports = new Contentstack();