Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flynnderek/iotapp-api
An easy API for rapid prototyping of IoT powered apps.
https://github.com/flynnderek/iotapp-api
arduino blockchain blockchain-as-a-backend blockchain-as-a-service decentralized-applications internet-of-things iot iot-api iot-platform microcontroller serverless serverless-framework
Last synced: 27 days ago
JSON representation
An easy API for rapid prototyping of IoT powered apps.
- Host: GitHub
- URL: https://github.com/flynnderek/iotapp-api
- Owner: FlynnDerek
- License: mit
- Created: 2020-07-02T09:21:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-11-10T05:57:57.000Z (almost 2 years ago)
- Last Synced: 2024-10-11T05:01:09.423Z (27 days ago)
- Topics: arduino, blockchain, blockchain-as-a-backend, blockchain-as-a-service, decentralized-applications, internet-of-things, iot, iot-api, iot-platform, microcontroller, serverless, serverless-framework
- Language: JavaScript
- Homepage: https://iotapp.network
- Size: 3.4 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# iotapp-api
[![GitHub issues](https://img.shields.io/github/issues/FlynnDerek/iotapp-api)](https://github.com/FlynnDerek/iotapp-api/issues)
[![npm version](https://badge.fury.io/js/iotapp-api.svg)](https://badge.fury.io/js/iotapp-api)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)An easy API for building IoT powered dApps with iotapp.
## Overview
The iotapp project aims to help developers and teams to integrate, manage and deploy their IoT devices across a decentralized network. Working in conjunction with the [iotapp Console](http://iotapp-alpha.surge.sh/#/login), this package aims to allow for fast prototyping and deployment of dApps built on the network. Get your app keys and start developing for free [here](http://iotapp-alpha.surge.sh/#/register).To learn more, please visit [our website](http://iotapp-alpha.surge.sh/#/).
## Installation
Use [NPM](https://www.npmjs.com/get-npm) to install iotapp-api
```bash
npm install iotapp-api
```## Usage
#### Import
```javascript
import iotapp from "iotapp-api";
```#### Get Public Blockchain
Call this function to return a copy of the entire iotapp blockchain.
```Javascript
var chainData = [];iotapp.getPublicChain()
.then(data => this.chainData = data)
```#### Get Private Transactions
Pass your channel app key(s) as an argument to get and display each transaction and it's data.
```Javascript
var chainData = [];iotapp.getPrivateChain("app_key_1", "app_key_2")
.then(data => this.chainData = data)
```#### Get Latest Transaction
Pass your app key(s) as an argument to get and display the latest data.
```Javascript
var chainData = [];iotapp.getLatestTx("app_key_1", "app_key_2")
.then(data => this.chainData = data)
```## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.## License
[MIT](https://choosealicense.com/licenses/mit/)