This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rexml/document' | |
| require 'rexml/xpath' | |
| require 'http' | |
| require 'icalendar' | |
| HTTP::Request::METHODS = HTTP::Request::METHODS + [:report] | |
| module AppleCalDav | |
| class Client | |
| attr_accessor :username, :password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env bash | |
| export APPLE_USER=user@example.com | |
| export APPLE_PASS=password1 | |
| export AUTH_PLIST=$(curl -su "$APPLE_USER:$APPLE_PASS" "https://setup.icloud.com/setup/authenticate/$APPLE_USER") | |
| export DSID=$(/usr/libexec/PlistBuddy -c "Print appleAccountInfo:dsid" /dev/stdin <<< $AUTH_PLIST) | |
| echo $DSID | |
| export TEMP_MME_AUTH_TOKEN=$(/usr/libexec/PlistBuddy -c "Print tokens:mmeAuthToken" /dev/stdin <<< $AUTH_PLIST) |
OlderNewer