@mangar2/sunnyportal

1.1.0 • Public • Published

Abstract

Contents

Meta

Class SunnyPortal

new SunnyPortal(config)

Gets current production/consumption infos from sunny portal Constructs a new sunny portal object

Example

const config = {
  user: 'your user',
  password: 'your password',
  host: 'www.sunnyportal.com',
  port: 443,
  paths: {
      login: '/Templates/Start.aspx',
      logout: '/Templates/Logout.aspx',
      production: '/Dashboard?_=1'
  }
}
const sunnyportal = new SunnyPortal(config)
const messages = sunnyportal.getMessages()
console.log(messages)

SunnyPortal Parameters

Name Type Description
config Object configuration options

config properties

Name Type Attribute Default Description
host string host of open sense map
port port optional 443 portnumer of open sense map ( usually 443 )
user string name of the login user
password string login password
paths Object needed paths to access the specific parts of the page

SunnyPortal Methods

getMessages

async getMessages () => {Array.<Message>}

Gets messages to send to the client

getMessages returns
Type Description
Array.<Message> Messages to send

Readme

Keywords

Package Sidebar

Install

npm i @mangar2/sunnyportal

Weekly Downloads

6

Version

1.1.0

License

LGPL-3.0-or-later

Unpacked Size

13.7 kB

Total Files

5

Last publish

Collaborators

  • mangar2