nana800-remote-config 1.0.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Andreas Linnert
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,98 @@
1
+ # Nana800 Remote Config from NANA800.io 🍺
2
+
3
+ ### Detail Documentation
4
+
5
+ [NANA800 Documentation 📊](https://nana800.gitbook.io/doc/features/remote-config-peremennye)
6
+
7
+ [Remote Config Pricing 📊](https://nana800.gitbook.io/doc/features/remote-config-peremennye#tarifikaciya)
8
+
9
+ ### Installation
10
+
11
+ ```bash
12
+ yarn add nana800-remote-config
13
+ ```
14
+
15
+ or
16
+
17
+ ```bash
18
+ npm i nana800-remote-config
19
+ ```
20
+
21
+ ### Usage
22
+
23
+ #### For JavaScript/TypeScript projects:
24
+
25
+ ```ts
26
+ import { nana800RemoteConfig } from "nana800-remote-config"
27
+
28
+ window.addEventListener('load', async () => {
29
+ const isFetched = await nana800RemoteConfig.initFetch({
30
+ platform: 'WEB',
31
+ remote_config_project_id: 'your-project-id',
32
+ api_key: 'your-api-key',
33
+ user_uniq_id: '1234',
34
+ lang_key: 'ru',
35
+ version: 1
36
+ })
37
+ console.log({isFetched})
38
+
39
+ const landingUrl = nana800RemoteConfig.getString('landing_url');
40
+ console.log({landingUrl})
41
+ })
42
+ ```
43
+
44
+ #### For HTML/JS projects:
45
+
46
+ ```html
47
+ <script src="https://s3.timeweb.cloud/c14a1252-bekender-files/cdn_libraries/nana800-remote-config.cjs.js"></script>
48
+
49
+ <script>
50
+ window.addEventListener('load', async () => {
51
+ const isFetched = await nana800RemoteConfig.initFetch({
52
+ platform: 'WEB',
53
+ remote_config_project_id: 'your-project-id',
54
+ api_key: 'your-api-key',
55
+ user_uniq_id: '1234',
56
+ lang_key: 'ru',
57
+ version: 1
58
+ })
59
+ console.log({isFetched})
60
+
61
+ const landingUrl = nana800RemoteConfig.getString('landing_url');
62
+ console.log({landingUrl})
63
+ })
64
+ </script>
65
+ ```
66
+
67
+ #### For other platforms (cURL):
68
+
69
+ ```bash
70
+ curl --location 'https://api.nana800.io/remote_config_records/fetch_user_remote_config_records' \
71
+ --header 'Content-Type: application/json' \
72
+ --data '{
73
+ "api_key": "your-api-key",
74
+ "remote_config_project_id": "your-project-id",
75
+ "lang_key": "ru",
76
+ "platform": "WEB",
77
+ "version": 1
78
+ }'
79
+ ```
80
+
81
+ ## FAQ
82
+
83
+ ### Where is the API key ("api_key"):
84
+ Get your API key from: https://cloud.nana800.io/settings
85
+
86
+ ### Where is the "remote_config_project_id":
87
+ Get your remote config project id after creating configuration on nana800.io
88
+
89
+ ### Platform values:
90
+ WEB | ANDROID | IOS | DESKTOP
91
+
92
+ ## Contacts
93
+
94
+ No-Code & Business & Analytics Cloud Platform [NANA800.io](https://nana800.io)
95
+
96
+ Platform Console [CLOUD.NANA800.io](https://cloud.nana800.io)
97
+
98
+ Platform Documentation [NANA800 Documentation](https://nana800.gitbook.io/doc)