Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@oada/client

Package Overview
Dependencies
Maintainers
8
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oada/client - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

dist/client.js

@@ -163,3 +163,3 @@ "use strict";

? utils.createNestedObject(linkObj, relativePathArray)
: undefined;
: {};
const resourceId = await this._createResource(contentType, newResource);

@@ -166,0 +166,0 @@ linkObj =

{
"name": "@oada/client",
"version": "1.0.0",
"version": "1.0.1",
"description": "A lightweight client tool to interact with an OADA-compliant server",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -5,9 +5,8 @@ # @oada/client

| | `@oada/client` | `@oada/oada-cache` |
| --- | --- | --- |
| Language | TypeScript | JavaScript |
| Supported protocols | websocket | websocket, HTTP |
| Internal cache | No | Yes |
| | `@oada/client` | `@oada/oada-cache` |
| ------------------- | -------------- | ------------------ |
| Language | TypeScript | JavaScript |
| Supported protocols | websocket | websocket, HTTP |
| Internal cache | No | Yes |
## Usage

@@ -18,7 +17,7 @@

```javascript
var client = require("@oada/client")
var client = require("@oada/client");
var connection = await client.connect({
domain: "api.oada.com",
token: "abc"
})
token: "abc",
});
```

@@ -31,3 +30,3 @@

```javascript
var response = await connection.get({ path: '/bookmarks/test' })
var response = await connection.get({ path: "/bookmarks/test" });
```

@@ -37,23 +36,23 @@

``` javascript
```javascript
var dataTree = {
"bookmarks": {
"_type": "application/vnd.oada.bookmarks.1+json",
"_rev": 0,
"thing": {
"_type": "application/json",
"_rev": 0,
"abc": {
bookmarks: {
_type: "application/vnd.oada.bookmarks.1+json",
_rev: 0,
thing: {
_type: "application/json",
_rev: 0,
abc: {
"*": {
"_type": "application/json",
"_rev": 0,
}
}
}
}
}
_type: "application/json",
_rev: 0,
},
},
},
},
};
var response = await connection.get({
path: '/bookmarks/thing',
tree: dataTree
})
path: "/bookmarks/thing",
tree: dataTree,
});
```

@@ -65,7 +64,7 @@

var response = await connection.get({
path: '/bookmarks/test',
watchCallback: d => {
path: "/bookmarks/test",
watchCallback: (d) => {
console.log(d);
}
})
},
});
```

@@ -81,4 +80,4 @@

data: { thing: "abc" },
contentType: "application/json"
})
contentType: "application/json",
});
```

@@ -88,24 +87,24 @@

``` javascript
```javascript
var dataTree = {
"bookmarks": {
"_type": "application/vnd.oada.bookmarks.1+json",
"_rev": 0,
"thing": {
"_type": "application/json",
"_rev": 0,
"abc": {
bookmarks: {
_type: "application/vnd.oada.bookmarks.1+json",
_rev: 0,
thing: {
_type: "application/json",
_rev: 0,
abc: {
"*": {
"_type": "application/json",
"_rev": 0,
}
}
}
}
}
_type: "application/json",
_rev: 0,
},
},
},
},
};
var response = await connection.put({
path: '/bookmarks/thing/abc/xyz/zzz',
path: "/bookmarks/thing/abc/xyz/zzz",
tree: dataTree,
data: { test: "something" }
})
data: { test: "something" },
});
```

@@ -116,3 +115,3 @@

```javascript
var response = await connection.head({ path: '/bookmarks/test' })
var response = await connection.head({ path: "/bookmarks/test" });
```

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc