项目作者: Ceereals

项目描述 :
Argo api for nodejs
高级语言: JavaScript
项目地址: git://github.com/Ceereals/ArgoAPI-NodeJS.git
创建时间: 2018-11-04T21:16:22Z
项目社区:https://github.com/Ceereals/ArgoAPI-NodeJS

开源协议:MIT License

下载


ArgoAPI-NodeJS

A simple npm module that allows you to communicate with ScuolaNext Argo’s API

npm version badge

Install

  1. npm i argoapi

Usage

With .then() clause

  1. const ArgoAPI = require('argoapi')
  2. ArgoAPI.login('school code','username','password')
  3. .then(message => {
  4. //successfull message
  5. })
  6. .catch(err => {
  7. //error message
  8. })

With async/await method

  1. const ArgoAPI = require('argoapi')
  2. //inside an async function
  3. try {
  4. await ArgoAPI.login('school code','username','password')
  5. } catch(e) {
  6. console.log(e)
  7. }

Documentation

For docs see the DOCS.md file.

License

MIT