Skip to content

Instantly share code, notes, and snippets.

@eccyan
Last active September 6, 2018 00:58
Show Gist options
  • Save eccyan/157975318a548c8812a7d3f829d08816 to your computer and use it in GitHub Desktop.
Save eccyan/157975318a548c8812a7d3f829d08816 to your computer and use it in GitHub Desktop.
recoru puncher
#!/bin/sh
if [ $# -ne 1 ]; then
echo "Usage: recoru punchType" 1>&2
echo " punchType: 1 出勤 2 退勤" 1>&2
echo "ENVIRONMENT_VARIABLES:" 1>&2
echo " RECORU_WORK_PLACE_ID: 企業ID"
echo " RECORU_AUTH_ID: 個人ID"
echo " RECORU_PASSWORD: パスワード"
exit 1
fi
curl -v -c /tmp/recoru.cookie -XPOST \
--data "title=%E3%83%AD%E3%82%B0%E3%82%A4%E3%83%B3&contractId=$RECORU_WORK_PLACE_ID&authId=$RECORU_AUTH_ID&password=$RECORU_PASSWORD" \
https://app.recoru.in/ap/login
# punchButtonId: 1 出勤 2 退勤
curl -v -b /tmp/recoru.cookie -XPOST -H "Content-Type: application/json" \
--data "{\"punchButtonId\":\"$1\", \"workPlaceId\":\"$RECORU_WORK_PLACE_ID\", \"searchedVersionNo\":\"2\"}" \
https://app.recoru.in/ap/home/doPunch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment