Created
November 14, 2013 09:12
-
-
Save otsune/7463795 to your computer and use it in GitHub Desktop.
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
http://www.healthplanet.jp/apis/api.html | |
タニタの体組成計のSDカードからデーターを投稿するアプリがWindowsにしか対応していないけど、このAPIみたらOauth2.0でXMLかJSON投げりゃ投稿できるっぽいな。 | |
SDカードの中をみたらTANITA/DATA1.CSVに計測ごとに1行追記してるだけだし。 | |
urn:ietf:wg:oauth:2.0:oob でコマンドラインスクリプト走らせりゃ済みそう。 | |
--- | |
アプリ登録して | |
https://www.healthplanet.jp/oauth/auth?client_id=[CLIENTID]&redirect_uri=https://www.healthplanet.jp/success.html&scope=innerscan&response_type=code | |
で認証してaccess_code貰って | |
curl --request POST -d client_id=[CLIENTID] -d client_secret=[CLIENTSECRET] -d redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob -d code=[ACCESSCODE] -d grant_type=authorization_code https://www.healthplanet.jp/oauth/token | |
でtoken取って | |
curl -d access_token=[TOKEN] -d date=1 -d tag=6021,6022 https://www.healthplanet.jp/status/innerscan.json | |
したら表示できた。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment