Skip to content

Instantly share code, notes, and snippets.

@temmings
Last active November 20, 2016 19:43
Show Gist options
  • Save temmings/efd03c5ecbd63d8b5e6524a0246f297d to your computer and use it in GitHub Desktop.
Save temmings/efd03c5ecbd63d8b5e6524a0246f297d to your computer and use it in GitHub Desktop.

Revisions

  1. temmings revised this gist Nov 20, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion register-iqos-packcode.sh
    Original file line number Diff line number Diff line change
    @@ -10,4 +10,4 @@ PASSWORD="${YOUR_LOGIN_PASSWORD}"
    PACKCODE=$1

    curl -c - -s ${IQOSPHERE_LOGIN_API} -d "login_id=${LOGIN_ID}&password=${PASSWORD}" \
    | curl -b - ${IQOSPHERE_REGISTER_API} -d "code_list%5B%5D=${PACKCODE}"
    | curl -b - ${IQOSPHERE_REGISTER_API} -d "code_list%5B%5D=${PACKCODE^^}"
  2. temmings renamed this gist Nov 20, 2016. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. temmings created this gist Nov 20, 2016.
    13 changes: 13 additions & 0 deletions register-iqos-packcode
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #!/bin/bash
    set -eu

    IQOSPHERE_DOMAIN="https://iqosphere.jp"
    IQOSPHERE_LOGIN_API="${IQOSPHERE_DOMAIN}/modules/login"
    IQOSPHERE_REGISTER_API="${IQOSPHERE_DOMAIN}/modules/awardpoint"

    LOGIN_ID="${YOUR_LOGIN_ID}"
    PASSWORD="${YOUR_LOGIN_PASSWORD}"
    PACKCODE=$1

    curl -c - -s ${IQOSPHERE_LOGIN_API} -d "login_id=${LOGIN_ID}&password=${PASSWORD}" \
    | curl -b - ${IQOSPHERE_REGISTER_API} -d "code_list%5B%5D=${PACKCODE}"