All Projects → cuba-platform → cuba-rest-js

cuba-platform / cuba-rest-js

Licence: Apache-2.0 license
Moved to https://github.com/cuba-platform/frontend/tree/master/packages/cuba-rest-js

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to cuba-rest-js

tesla
Tesla custom integration for Home Assistant. This requires a refresh token be generated by third-party apps to login.
Stars: ✭ 145 (+866.67%)
Mutual labels:  integration
cypherpoker.js
An open source peer-to-peer poker platform with cryptocurrency integration written in JavaScript.
Stars: ✭ 72 (+380%)
Mutual labels:  node-js
karkas
A tiny template engine based on TypeScript
Stars: ✭ 14 (-6.67%)
Mutual labels:  node-js
visonic
Visonic Custom Component for integration with Home Assistant
Stars: ✭ 57 (+280%)
Mutual labels:  integration
mbapipy
MercedesME platform as a Custom Component for Home Assistant.
Stars: ✭ 25 (+66.67%)
Mutual labels:  integration
hypixel-api-reborn
Feature-rich Hypixel API wrapper for Node.js
Stars: ✭ 80 (+433.33%)
Mutual labels:  node-js
ballerina-integrator
A powerful, simple-to-learn, code-driven approach to programming integrations
Stars: ✭ 36 (+140%)
Mutual labels:  integration
pivot-vue
Integration example of WebDataRocks web reporting tool with the Vue framework
Stars: ✭ 17 (+13.33%)
Mutual labels:  integration
ynab
YNAB component for Home Assistant
Stars: ✭ 26 (+73.33%)
Mutual labels:  integration
VAG.Node
GB28181 PS流转发网关服务<Node 版>,以GB28181对接的方式将摄像机/硬盘录像机 的PS流(H264/H265)打包推送到RTMP服务器。
Stars: ✭ 48 (+220%)
Mutual labels:  node-js
reddit-clone
A reddit clone written using node.js / express.js / mongodb / passport.js. https://seiya-beddit.herokuapp.com/
Stars: ✭ 84 (+460%)
Mutual labels:  node-js
Backend-NodeJS-Golang-Interview QA
A collection of Node JS and Golang Backend interview questions please feel free to fork and contribute to this repository
Stars: ✭ 122 (+713.33%)
Mutual labels:  node-js
ballpark-tracker
A simple application used for tracking which MLB and AAA stadiums a "Ballpark Chaser" has been to.
Stars: ✭ 15 (+0%)
Mutual labels:  node-js
node-metamask
🦊 Connect to MetaMask from node.js
Stars: ✭ 79 (+426.67%)
Mutual labels:  node-js
warframe-worldstate-parser
📗 An Open parser for Warframe's Worldstate in Javascript
Stars: ✭ 50 (+233.33%)
Mutual labels:  node-js
inspireNuggetsSlackBot
A simple Slackbot that displays random inspiring techie quotes and jokes for developers/designers.
Stars: ✭ 15 (+0%)
Mutual labels:  node-js
Node.js-
一日不转行,学习永不停!
Stars: ✭ 16 (+6.67%)
Mutual labels:  node-js
maasta
MAAS Terraform Ansible
Stars: ✭ 132 (+780%)
Mutual labels:  integration
logzio-k8s
No description or website provided.
Stars: ✭ 24 (+60%)
Mutual labels:  integration
FOODIE
Fortran Object-Oriented Differential-equations Integration Environment, FOODIE
Stars: ✭ 109 (+626.67%)
Mutual labels:  integration

💡 Moved to cuba-platform/frontend/packages/cuba-rest-js

CUBA REST JS

Build Status

JavaScript library for web and Node.js which facilitates CUBA Platfotm's REST API usage.

Installation

npm

npm install @cuba-platform/rest --save

Import as module

const cuba = require('@cuba-platform/rest');

Or using ES6 imports:

import * as cuba from '@cuba-platform/rest';

bower

bower install cuba-platform/cuba-rest-js
<script src="./bower_components/cuba-rest-js/dist-browser/cuba.js">

Dependencies and requirements

Library has no external dependencies. It's assumed that Promise and fetch -compatible API are available or polyfilled i.e. in node environment:

npm install node-fetch --save
global.fetch = require('node-fetch');

Usage

import * as cuba from 'cuba-rest-js';

const app = cuba.initializeApp({
  name: 'myApp',
  apiUrl: 'http://localhost:8080/app/rest/'
});

app.getUserInfo().then((d) => {
  console.log(d);
});

// retrieve app by name

const myApp = cuba.getApp('myApp');

or use if you want to manage instances yourself

const myApp = new CubaApp("myApp", "http://localhost:8080/app/rest/")
myApp.loadEntities('sec$User', {view: '_minimal', sort: 'login'}).then((users) => {
  console.log(users);
});

Full API reference

Development

Tests

In order to run integration tests you need Java to be installed.

Integration tests

npm run test:integration

Running manually

Start test CUBA app

npm run start-test-app

Run tests

npm test

Stop test app

npm run teardown-test-app

Build

npm run dist

Lint

npm run lint

Generate documentation

npm run generate-docs
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].