0.2.2 • Published 4 years ago

iserv v0.2.2

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

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

ParamTypeDefaultDescription
ServerHostStringthe host of the IServ Instance. Without protocol
usernameStringusername used for login
passwordStringpassword used for login
keepalivebooleanNot yet implemented
logbooleanfalseEnable debug logging
reuseCookiesbooleansave 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

ParamTypeDescription
sinceStringDate 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

ParamTypeDefaultDescription
pathString"INBOX"
lengthint | string50Amount of Mails returned
startint | string0Offset (50 for starting at 50. Mail)
columnstring"\"date\""Set column for sorting
dirstring"\"desc\""Sorting direction (desc/asc)

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

Get all upcoming Events

Kind: instance method of IServTool

ParamTypeDefaultDescription
includeSubscriptionsbooleantrueInclude Subscriptions
limitint | String14how 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

ParamTypeDefaultDescription
userStringUsername you want the image from
wint | String""Image width, leave blank for full size
hint | 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

ParamTypeDefaultDescription
idint | StringMessage ID
pathString"INBOX"Message Path (Inbox name)

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

Quick user lookup - for autocompletion

Kind: instance method of IServTool

ParamTypeDescription
queryStringQuery

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

Get Folder Tree (Files)

Kind: instance method of IServTool

ParamTypeDefaultDescription
subfolderString""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

ParamTypeDescription
sourceStringPath to source
startStringStart date for query
endStringEnd date for query

iServTool.isCookieValid() ⇒ Promise.<Object>

Check if the saved Cookies are still valid

Kind: instance method of IServTool