Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/21dimensions/js-client
Client for EasyEasy.io cloud database
https://github.com/21dimensions/js-client
cloud database databases easyeasy orm orm-framework storage
Last synced: 17 days ago
JSON representation
Client for EasyEasy.io cloud database
- Host: GitHub
- URL: https://github.com/21dimensions/js-client
- Owner: 21dimensions
- Created: 2018-09-17T07:05:52.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-23T13:32:06.000Z (about 6 years ago)
- Last Synced: 2024-11-09T04:36:01.603Z (2 months ago)
- Topics: cloud, database, databases, easyeasy, orm, orm-framework, storage
- Language: JavaScript
- Homepage: http://easyeasy.io/
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# easyeasy-client
## How to use
### Install
```
npm install easyeasy-client
```### Initialize
```js
var client = require('easyeasy-client')({
key:"YOUR_APP_KEY"
});
```### Examples
```js
var cat = {
name: "Sam",
age: 1.1,
interests: ["play", "run", "eat"]
}// add new object
var id = await client.add("cat", cat);// get object by id
cat = await client.getOne("cat", id);// update object
cat.age = 1.5;
await client.update("cat", cat);// get filtered array of objects.
var allcats = await client.get("cat"); // return all cats
var cats = await client.get("cat", { age: 1.5 }); // 1.5 years old cats
cats = await client.get("cat", { age_gt: 1.0 }); // cats older than 1 year
cats = await client.get("cat", { name_like: "Sa*" });//Learn more about filtering operators at: http://easyeasy.io/docs#/operators
// paging
cats = await client.get("cat", { _start: 20, _count: 20 });
// ordering
cats = await client.get("cat", { _orderby: "age" });
cats = await client.get("cat", { _orderbydesc: "age" });//delete
await client.del('cat', id);
```# Licence
ISC