Skip to content

Instantly share code, notes, and snippets.

@FlandreDaisuki
Created January 16, 2019 14:52
Show Gist options
  • Save FlandreDaisuki/874df8492ebdcb00bb7e425d1c2d2e4c to your computer and use it in GitHub Desktop.
Save FlandreDaisuki/874df8492ebdcb00bb7e425d1c2d2e4c to your computer and use it in GitHub Desktop.
u need curl and jq
#!/bin/sh
# 還願機器人
# 用法:
# $ chmod +x ./luxin.sh
# $ ./luxin.sh '陸心是誰創辦的?'
# {
# "type": "text",
# "data": "陸心青年服務團是由陸恭銘先生在1987年所創立。"
# }
URL='https://us-central1-nodejsapi-50144.cloudfunctions.net/worshipCandlesAPI/chatMessage/'
curl -s -X POST -d "data=$1" $URL | jq
@FlandreDaisuki
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment