Comparing version 0.0.2 to 0.1.0
@@ -58,3 +58,3 @@ var events = require('events'); | ||
if (eventFlags & 1) { | ||
if (eventFlags & 2) { | ||
this.flags.push('important'); | ||
@@ -61,0 +61,0 @@ } |
{ | ||
"name": "ancs", | ||
"version": "0.0.2", | ||
"version": "0.1.0", | ||
"description": "A node.js lib to access the Apple Notification Center Service (ANCS)", | ||
@@ -31,4 +31,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"noble": "~0.2.0" | ||
"noble": "~0.3.9" | ||
} | ||
} |
117
README.md
@@ -1,13 +0,14 @@ | ||
ancs | ||
========= | ||
# ancs | ||
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/sandeepmistry/node-ancs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
A node.js lib to access the [Apple Notification Center Service (ANCS)](https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/AppleNotificationCenterServiceSpecification/Introduction/Introduction.html) | ||
Install | ||
------- | ||
## Install | ||
npm install ancs | ||
```sh | ||
npm install ancs | ||
``` | ||
Prerequisites | ||
------------- | ||
## Prerequisites | ||
@@ -17,24 +18,33 @@ * iOS 7 device with an app in peripheral mode which exposes ANCS | ||
Usage | ||
----- | ||
## Usage | ||
var ANCS = require('ancs'); | ||
```javascript | ||
var ANCS = require('ancs'); | ||
``` | ||
__Discover__ | ||
### Discover | ||
ANCS.discover(callback(ancs)); | ||
```javascript | ||
ANCS.discover(callback(ancs)); | ||
``` | ||
__Connect__ | ||
### Connect | ||
ancs.connect(callback); | ||
```javascript | ||
ancs.connect(callback); | ||
``` | ||
__Disconnect__ | ||
### Disconnect | ||
ancs.disconnect(callback); | ||
```javascript | ||
ancs.disconnect(callback); | ||
``` | ||
__Notification Events__ | ||
### Notification Event | ||
ancs.on('notification', function(notification) { | ||
... | ||
}); | ||
```javascript | ||
ancs.on('notification', function(notification) { | ||
// ... | ||
}); | ||
``` | ||
@@ -65,40 +75,49 @@ * notification has the following properties | ||
__Operations for 'added' or 'modified' notifications (event property)__ | ||
### Operations for 'added' or 'modified' notifications (event property) | ||
Read App Identifier | ||
#### Read App Identifier | ||
notification.readAppIdentifier(function(appIdentifier) { | ||
... | ||
}); | ||
```javascript | ||
notification.readAppIdentifier(function(appIdentifier) { | ||
// ... | ||
}); | ||
``` | ||
Read Title | ||
#### Read Title | ||
notification.readTitle(function(title) { | ||
... | ||
}); | ||
```javascript | ||
notification.readTitle(function(title) { | ||
// ... | ||
}); | ||
``` | ||
Read Subtitle | ||
#### Read Subtitle | ||
notification.readSubtitle(function(subtitle) { | ||
... | ||
}); | ||
```javascript | ||
notification.readSubtitle(function(subtitle) { | ||
// ... | ||
}); | ||
``` | ||
Read Message | ||
#### Read Message | ||
notification.readMessage(function(message) { | ||
... | ||
}); | ||
```javascript | ||
notification.readMessage(function(message) { | ||
// ... | ||
}); | ||
``` | ||
Read Date | ||
#### Read Date | ||
```javascript | ||
notification.readDate(function(date) { | ||
// ... | ||
}); | ||
``` | ||
notification.readDate(function(date) { | ||
... | ||
}); | ||
Read All Attributes | ||
notification.readAttributes(function(attributes) { | ||
... | ||
}); | ||
#### Read All Attributes | ||
```javascript | ||
notification.readAttributes(function(attributes) { | ||
// ... | ||
}); | ||
``` | ||
* attributes has the following properties | ||
@@ -110,1 +129,3 @@ * appIdentifier | ||
* date | ||
[![Analytics](https://ga-beacon.appspot.com/UA-56089547-1/sandeepmistry/node-ancs?pixel)](https://github.com/igrigorik/ga-beacon) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14065
129
+ Addedbplist-parser@0.0.6(transitive)
+ Addednan@2.22.0(transitive)
+ Addednoble@0.3.14(transitive)
+ Addedxpc-connection@0.1.4(transitive)
- Removednoble@0.2.8(transitive)
Updatednoble@~0.3.9