Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
npomfret committed Jan 6, 2017
1 parent b4bd867 commit 4ba50a8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ Rx support with [react-native-contacts-rx](https://github.com/JeanLebrument/reac
| groups | 😞 | 😞 |



## API
`getAll` (callback) - returns *all* contacts as an array of objects
`getAllWithoutPhotos` - same as `getAll` on Android, but on iOS it will not return uris for contact photos (because there's a significant overhead in creating the images)
`getPhotoForId(contactId, callback)` - returns a URI (or null) for a contacts photo
`addContact` (contact, callback) - adds a contact to the AddressBook.
`updateContact` (contact, callback) - where contact is an object with a valid recordID
`deleteContact` (contact, callback) - where contact is an object with a valid recordID
`checkPermission` (callback) - checks permission to access Contacts
`requestPermission` (callback) - request permission to access Contacts

* `getAll` (callback) - returns *all* contacts as an array of objects
* `getAllWithoutPhotos` - same as `getAll` on Android, but on iOS it will not return uris for contact photos (because there's a significant overhead in creating the images)
* `getPhotoForId(contactId, callback)` - returns a URI (or null) for a contacts photo
* `addContact` (contact, callback) - adds a contact to the AddressBook.
* `updateContact` (contact, callback) - where contact is an object with a valid recordID
* `deleteContact` (contact, callback) - where contact is an object with a valid recordID
* `checkPermission` (callback) - checks permission to access Contacts
* `requestPermission` (callback) - request permission to access Contacts

## Usage
`getAll` is a database intensive process, and can take a long time to complete depending on the size of the contacts list. Because of this, it is recommended you access the `getAll` method before it is needed, and cache the results for future use.
Expand Down

0 comments on commit 4ba50a8

Please sign in to comment.