Giter Site home page Giter Site logo

icloud's Introduction

icloud

Access the iCloud API

usage

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);
    });
});

services

Contacts is the only service implemented so far. Pull-requests welcome.

credits

The implementation is heavily inspired by pycloud

icloud's People

Contributors

andreassolberg avatar lafersousa avatar weisjohn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

icloud's Issues

notification emails from apple

Hi

I tried to include the icloud module from bitte-ein-bit (https://github.com/bitte-ein-bit/MMM-iCloud-Client) into my magic mirror software (https://github.com/MichMich/MagicMirror). It uses your icloud API.
It works well. The only problem is, that everytime when the software updates the data from iclould I get an notification email from apple, which informes me, that somebody logged into my icloud account. I dont know how to solve this.
Now bitte-ein-bit told me:
I guess the problem lies at https://github.com/weisjohn/icloud/blob/master/index.js#L[1]34. On each run a new uuid is generated. Maybe some way to store this in the config would be great.
So do you have any solution for this problem?

Thank you

MIchael

TypeError: cb is not a function

I am trying to get events and it is raising exception.
/node_modules/icloud/index.js:144 cb(null, body)
TypeError: cb is not a function
This is how I am calling events function.
`instance.login(username, password, function(err) {
if (err) return console.log('login failed');

instance.events("2015-07-16","2016-07-16","America/New_York", function( err, results){
    
    if (err) {
        console.log('failed to fetch contacts');
        res.send(err);
    } else {
        console.log(results.contacts);
        res.send(results.result);
    }
    
});

});`

What I am doing wrong? Running on localhost, macos.

two-factor auth

iCloud accounts can require a two-factor auth step. Currently, we have no support for that flow.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.