@oceanum/datamesh 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/README.md +25 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,11 +1,30 @@
1
- # datamesh
1
+ # @oceanum/datamesh
2
2
 
3
- This library was generated with [Nx](https://nx.dev).
3
+ A typescript library for interacting with the Oceanum.io Datamesh.
4
4
 
5
- ## Building
5
+ ## Installation
6
6
 
7
- Run `nx build datamesh` to build the library.
7
+ You can use this library in Node.js, Deno or browser code
8
8
 
9
- ## Running unit tests
9
+ ```sh
10
+ npm install @oceanum/datamesh
11
+ ```
10
12
 
11
- Run `nx test datamesh` to execute the unit tests via [Vitest](https://vitest.dev/).
13
+ ## Usage
14
+
15
+ ```javascript
16
+ import { Connector } from "@oceanum/datamesh";
17
+
18
+ //Instatiate the Datamesh Connector
19
+ const datamesh=Connector("my_datamesh_token"); //Get you datamesh token from your Oceanum.io account
20
+
21
+ //Define a datamesh query
22
+ const query={
23
+ "datasource":"oceanum-sizing_giants"
24
+ }
25
+
26
+ //Get the data
27
+ const data=await datamesh.query(query);
28
+ ```
29
+
30
+ DO NOT put your Datamesh token directly into browser code. For use in an SPA, you can either forward your Datamesh request through a proxy or implement a token exchange. Read the [library documentation](https://oceanum-js.oceanum.io/) to learn more.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oceanum/datamesh",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "scripts": {},
5
5
  "publishConfig": {
6
6
  "access": "public"