1.0.22 • Published 5 years ago

iotery-browser-sdk v1.0.22

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

iotery.io Client SDK

This library is a client (browser) version of the Iotery Server SDK and should only be used if you know what you are doing.

If you do not have special requirements that would require a client version of the SDK, use the node server SDK.

Usage

import React, { useEffect, useState } from "react";
import logo from "./logo.svg";
import "./App.css";

import Iotery from "iotery-browser-sdk";
const iotery = new Iotery(
  "my-api-key"
); //never do this in the browser unless you know what you are doing.

function App() {
  const [devices, setDevices] = useState([]);

  useEffect(() => {
    iotery.getDeviceList().then(res => {
      console.log(res);
      setDevices(res.results);
    });
  }, [devices]);

  console.log(devices);

  return (
    <div className="App">
      <header className="App-header">
        <img src={logo} className="App-logo" alt="logo" />
        <p>
          {devices.map(d => {
            return <div style={{padding:10}}>{d.serial}</div>;
          })}
        </p>
      </header>
    </div>
  );
}

export default App;
1.0.22

5 years ago

1.0.21

5 years ago

1.0.20

5 years ago

1.0.19

5 years ago

1.0.18

5 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.6

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago