iserv
v0.2.2
Published
IServ API Wrapper for nodeJS
Downloads
3
Readme
IServTool
Kind: global class
Licence: MIT
Version: 0.2
Author: dunklesToast / Tom Sacher
- IServTool
- new IServTool(ServerHost, username, password, [keepalive], [log], [reuseCookies])
- .login() ⇒ Promise.<void>
- .getNotifications(since) ⇒ Promise.<Object>
- .getMailFolders() ⇒ Promise.<Object>
- .getUnreadMails() ⇒ Promise.<Object>
- .getMessagesForInbox([path], [length], [start], [column], [dir]) ⇒ Promise.<Object>
- .getUpcomingEvents([includeSubscriptions], [limit]) ⇒ Promise.<Object>
- .getUserProfilePic(user, [w], [h]) ⇒ Promise.<Object>
- .getMessageByID(id, [path]) ⇒ Promise.<Object>
- .userLookup(query) ⇒ Promise.<Object>
- .getFolderTree([subfolder]) ⇒ Promise.<Object>
- .getEventSources() ⇒ Promise.<Object>
- .getEventsFromSource(source, start, end) ⇒ Promise.<Object>
- .isCookieValid() ⇒ Promise.<Object>
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 | ""date"" | Set column for sorting | | [dir] | string | ""desc"" | 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