New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@winm2m/argos-api

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@winm2m/argos-api

API for the Argos IoT Mobile Web/APP

latest
Source
npmnpm
Version
0.3.1
Version published
Maintainers
1
Created
Source

@winm2m/argos-api

Description

An API for the Argos project, and also could be used as a library as general CRUD purposes.

Installation

npm install --save @winm2m/argos-api

Usage

const { API } = require('@winm2m/argos-api')

const API_PREFIX = 'https://wherever.you.host'
const API_VERSION = '0.3.1' // current version of this package

const api = new API(API_PREFIX, API_VERSION)

var result

// login
result = await api.login({ email: 'admin', password: 'admin' })
const token = result.token

// upsert ( insert or update )
result = await api.upsert({
  entity: 'sample',
  body: {
    name: 'sample',
    description: 'sample'
  }
})
console.log(`id of new content : ${result.id}`)

// find
const results = await api.find({
  entity: 'sample',
  contains: {
    name: 'sample'
  }
})

// delete
result = await api.delete(result.id)

Keywords

winm2m

FAQs

Package last updated on 22 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts