1.1.0 • Published 3 years ago

@mangar2/sunnyportal v1.1.0

Weekly downloads
1
License
LGPL-3.0-or-later
Repository
github
Last release
3 years ago

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

NameTypeDescription
configObjectconfiguration options

config properties

NameTypeAttributeDefaultDescription
hoststringhost of open sense map
portportoptional443portnumer of open sense map ( usually 443 )
userstringname of the login user
passwordstringlogin password
pathsObjectneeded 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
TypeDescription
Array.<Message>Messages to send