下位10%のダメなエンジニアシリーズ

パズル1

答え

curl http://challenge-your-limits.herokuapp.com/call/me
# getだめだよって怒られる
curl -F "hoge=hoge" http://challenge-your-limits.herokuapp.com/call/me
# 適当にPOSTすると正しいURLを教えてくれる
curl -F "name=hoge" -F "email=huga@hoge.com" \
http://challenge-your-limits.herokuapp.com/challenge_users
# あとはこんな感じで

パズル2

答え

curl http://challenge-your-limits2.herokuapp.com/call/my/APIs
# メソッドが違うらしい
curl -X DELETE http://challenge-your-limits2.herokuapp.com/call/my/APIs
# いろいろ試すとDELETEで通る
curl http://challenge-your-limits2.herokuapp.com/c2_users/12/hacker_apply
# 案内されたURLにリクエストするとなんか違うらしい
curl http://challenge-your-limits2.herokuapp.com/help/me/out
# とりあえず登録
curl -F "username=yaasita" -F 'email=hoge1@example.com' \
http://challenge-your-limits2.heroku/app.com/c2_users/
# 帰ってきた値でBASIC認証
curl --user yaasita:uRd4yy-imPbHBR4W http://challenge-your-limits2.herokuapp.com/c2_users/10
# あとは帰ってきた文字列をBASE64デコード

パズル3

答え

# 最初にアクセスすると数式を予想せよとくる
curl http://challenge-your-limits3.herokuapp.com/formula/is/x%20+5
# 登録
curl -F "username=huga" -F "email=huga@hoge.com" \
http://challenge-your-limits3.herokuapp.com/challengers
# なぜかアイスランドのURL
curl --user yaasita:Z_7X4YgOayB1-upL http://challenge-your-limits3.herokuapp.com/welcome/to/Iceland
curl --user yaasita:Z_7X4YgOayB1-upL http://challenge-your-limits3.herokuapp.com/why/Iceland
# 緯度、経度をパッチする
curl --user yaasita:Z_7X4YgOayB1-upL \
    --request PATCH \
    --header 'Content-Type: application/json' \
    --data '{"latitude": 64.92290,"longitude": -17.73678}' \
    http://challenge-your-limits3.herokuapp.com/challengers/4303
# あとは登録
curl --user yaasita:Z_7X4YgOayB1-upL http://challenge-your-limits3.herokuapp.com/welcome/to/Iceland