Git Product home page Git Product logo

hydrologicengineeringcenter / cwms-data-api-client-javascript Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 0.0 3.35 MB

A JavaScript wrapper for the CWMS Data API (CDA), a RESTful web service for managing water data. https://www.npmjs.com/package/cwmsjs The Documentation is the link below:

Home Page: https://hydrologicengineeringcenter.github.io/cwms-data-api-client-javascript/

TypeScript 88.66% CSS 1.33% JavaScript 8.04% HTML 1.98%
hec javascript rest-api typescript water-management cdajs cwms

cwms-data-api-client-javascript's Introduction

CWMSjs

CWMS Data API (CDA) client library created with OpenAPI generator in TypeScript for use with web browsers.

Getting Started

  • Install CWMSjs to your react project with:
    npm install cwmsjs --save
    (This will grab the latest)

  • Import the API endpoint you wish to use:

    • Avaiable endpoints are here (Classes ending in API): Endpoints
    • At the top of your js/jsx/file type:
          import { TimeseriesAPI } from "cwmsjs"
    • Then initialize the TimeseriesAPI with:
          const tsa = new TimeseriesAPI()
    • Fetch timeseries data with:
          await ts_api.getCwmsDataTimeseries({
              "office": "SWT",
              "name": "KEYS.Elev.Inst.1Hour.0.Ccp-Rev",
          })
          .then((data) => {
              console.log(data)
          }).catch(e => { 
              console.log("My Error", e)
          })

Documentation is available for both developers and new users:

cwms-data-api-client-javascript's People

Contributors

krowvin avatar mikeneilson avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cwms-data-api-client-javascript's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.