Link icloud, spreadsheet, and mapbox, and record iphone's location information & history in spreadsheet.
git clone [email protected]:makobouzu/Find-my-iphone.git
cd find-my-iphone
npm install
touch .env
- PORT
- APPLE_ID
- PASSWORD
- SPREADSHEET_ID
https://docs.google.com/spreadsheets/d/XXXXXXXXXXXXXXXXXXXXXXXXXXX/edit#gid=0
-> SPREADSHEET_ID="XXXXXXXXXXXXXXXXXXXXXXXXXXX"
- SHIFT_WORKSHEET_ID
https://docs.google.com/spreadsheets/d/XXXXXXXXXXXXXXXXXXXXXXXXXXX/edit#gid=0
-> SHIFT_WORKSHEET_ID="0"
Go to [Google Cloud Platform] (https://console.cloud.google.com/home)-> Create new Project-> Go to "APIs and Services"-> Click "Enable APIs and Services"-> Enable Google Sheets API
Click "Create Credentials"-> API to use = Google Sheets API & Data type to access = Application data (No, not used)-> Write service account (Role = Editor)-> "Done"
Click "[email protected]" in Service Account-> Click "Add Key (Create New Key)" in Key-> Download json-> rename credentials.json & mv ./routes
Share E-mail(client_email: [email protected] in credentials.json) in Spreadsheet settings -> Editor
- Reference
- [How to read shift data from Google Spreadsheet with Node.js] (https://www.twilio.com/blog/load-data-from-google-spreadsheet-jp)
Sign in mapbox -> Copy default public token -> Paste mapboxgl.accessToken in index.js:4
- Reference
cd find-my-iphone
npm run devStart