Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 979 Bytes

README.md

File metadata and controls

39 lines (31 loc) · 979 Bytes

icloud

Access the iCloud API

usage

###for contact fetching

var icloud = require('icloud');

var instance = icloud();
instance.login("username", "password", function(err) {
    if (err) return console.log('login failed');
    instance.contacts(function(err, results) {
        if (err) return console.log('failed to fetch contacts');
        console.log(results.contacts);
    });
});

###for event fetching

var icloud = require('icloud');

var instance = icloud();
instance.login("username", "password", function(err) {
    if (err) return console.log('login failed');
    instance.calendar(function(err, results) {
        if (err) return console.log('failed to fetch events');
        console.log(results);
    });
});

####in the index.js, you can change the Date Range for the range of events you would like to fetch

credits

The implementation is heavily inspired by pycloud