nodemessage

0.0.6 • Public • Published

npm

NodeMessage

This library allows you to query and chain commands to your local iMessage database. All functions return promises.

Install

npm install nodemessage

Setup

const imessage = require('nodemessage')
const m = new imessage()

Messages

// Get all messages
m.getAllMessages()
 
// Get messages with keyword
m.getMessagesWithText("keyword")
 
// Get messages from recipient ID
m.getMessagesFromID(1)
 
// Get messages from recipient with specific keyword text
m.getMessagesFromRecipientWithID(1, "keyword")

Recipients

// get all contact recipients
m.getAllRecipients()
 
// Get recipients with handle "shelley"
m.getRecipientByHandle("shelley")
 
// Get recipient with ID 1
m.getRecipientByID(1)
 
// Get recipient with ID 1 and all of their messages
m.getRecipientMessagesByID(1)

Top Contacts

// get top 10 contacts from last 30 days and related info
m.getTopContacts(10, 30)

Attachments

// Get all attachments
m.getAllAttachments()
 
// Get attachments from recipient with ID 1
m.getAttachmentsByID(1)

Example

const imessage = require("nodemessage")
const m = new imessage()
 
m.getAllMessages().then(messages => {
  console.log(messages)
})
 
m.disconnect()

Package Sidebar

Install

npm i nodemessage

Weekly Downloads

0

Version

0.0.6

License

ISC

Unpacked Size

7.68 kB

Total Files

3

Last publish

Collaborators

  • codebytere