0.2.1 • Published 1 year ago

@armrest/client v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Armrest Node.js Client Library

A Node.js library for creating an Armrest client api.

Installation

Install using npm

npm install @armrest/client

Get Started

ESM

import Armrest from '@armrest/client'

Create new api

const API = new Armrest('http://armrest-api-url')
  .model('Example')

const api = API('api-key')

Creating an Object

const example = await api.Example.create({
  test: 'attribute'
})

Updating an Object

await example.update({ test: 'changevalue' })

Selecting Objects

Objects can be selected using any attribute.

const results = await api.select(api.Example).filterBy({ test: 'value' })

Write complex queries using filter.

const results = api.Example.filter(
    pl.or(
       pl.Example.test.eq('value'),
       pl.Example.test.eq('othervalue')
    )
)
0.2.1

1 year ago

0.2.0

1 year ago

0.1.2

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago