iserv

0.2.2 • Public • Published

IServTool

Kind: global class
Licence: MIT
Version: 0.2
Author: dunklesToast / Tom Sacher

new IServTool(ServerHost, username, password, [keepalive], [log], [reuseCookies])

Create a IServTool instance

Param Type Default Description
ServerHost String the host of the IServ Instance. Without protocol
username String username used for login
password String password used for login
[keepalive] boolean Not yet implemented
[log] boolean false Enable debug logging
[reuseCookies] boolean save cookies and reuse them. only works for one user

iServTool.login() ⇒ Promise.<void>

Login

Kind: instance method of IServTool

iServTool.getNotifications(since) ⇒ Promise.<Object>

Get all notifications from the Server for the logged in account

Kind: instance method of IServTool

Param Type Description
since String Date where the Server should start fetching

iServTool.getMailFolders() ⇒ Promise.<Object>

Get all Mailfolders / Inboxes for current user

Kind: instance method of IServTool

iServTool.getUnreadMails() ⇒ Promise.<Object>

Get all Mails in INBOX

Kind: instance method of IServTool

iServTool.getMessagesForInbox([path], [length], [start], [column], [dir]) ⇒ Promise.<Object>

Get all Messages for specified Inbox

Kind: instance method of IServTool

Param Type Default Description
[path] String "INBOX"
[length] int | string 50 Amount of Mails returned
[start] int | string 0 Offset (50 for starting at 50. Mail)
[column] string "&quot;date&quot;" Set column for sorting
[dir] string "&quot;desc&quot;" Sorting direction (desc/asc)

iServTool.getUpcomingEvents([includeSubscriptions], [limit]) ⇒ Promise.<Object>

Get all upcoming Events

Kind: instance method of IServTool

Param Type Default Description
[includeSubscriptions] boolean true Include Subscriptions
[limit] int | String 14 how many events to be returnes

iServTool.getUserProfilePic(user, [w], [h]) ⇒ Promise.<Object>

Get a users Profile Picture. Returns false if no image was found

Kind: instance method of IServTool

Param Type Default Description
user String Username you want the image from
[w] int | String "" Image width, leave blank for full size
[h] int | String "" Image height, leave blank for full size

iServTool.getMessageByID(id, [path]) ⇒ Promise.<Object>

Get a Message (Mail) by ID

Kind: instance method of IServTool

Param Type Default Description
id int | String Message ID
[path] String "INBOX" Message Path (Inbox name)

iServTool.userLookup(query) ⇒ Promise.<Object>

Quick user lookup - for autocompletion

Kind: instance method of IServTool

Param Type Description
query String Query

iServTool.getFolderTree([subfolder]) ⇒ Promise.<Object>

Get Folder Tree (Files)

Kind: instance method of IServTool

Param Type Default Description
[subfolder] String "" ID to create tree. Leave blank for root

iServTool.getEventSources() ⇒ Promise.<Object>

Get all EventSources aka Calendars

Kind: instance method of IServTool

iServTool.getEventsFromSource(source, start, end) ⇒ Promise.<Object>

Get Events from Source

Kind: instance method of IServTool

Param Type Description
source String Path to source
start String Start date for query
end String End date for query

iServTool.isCookieValid() ⇒ Promise.<Object>

Check if the saved Cookies are still valid

Kind: instance method of IServTool

Readme

Keywords

none

Package Sidebar

Install

npm i iserv

Weekly Downloads

3

Version

0.2.2

License

MIT

Unpacked Size

1.07 MB

Total Files

40

Last publish

Collaborators

  • dunklestoast