forked from MindExMachina/smartgeometry
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
34 lines (30 loc) · 940 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
BASE_URL=https://gateway.watsonplatform.net/tone-analyzer/api
USERNAME=6f924834-52fd-47be-8593-317bf2386a27
PASSWORD=G6yAzq0Jck84
# POST sample 1
analyze:
@curl -X POST --user "$(USERNAME)":"$(PASSWORD)" \
--header "Content-Type: application/json" \
--data-binary @tone.json \
"$(BASE_URL)/v3/tone?version=2017-09-21"
@echo ""
# POST sample 2
analyze2:
@curl -X POST --user "$(USERNAME)":"$(PASSWORD)" \
--header "Content-Type: application/json" \
--data-binary @tone2.json \
"$(BASE_URL)/v3/tone?version=2017-09-21"
@echo ""
# GET sample
get:
@curl -X GET --user "$(USERNAME)":"$(PASSWORD)" \
"$(BASE_URL)/v3/tone?version=2017-09-21\
&text=I%20think%20I%20am%20going%20to%20%20like%20this."
@echo ""
# POST user engagement
engagement:
@curl -X POST --user "$(USERNAME)":"$(PASSWORD)" \
--header "Content-Type: application/json" \
--data-binary @tone-chat.json \
"$(BASE_URL)/v3/tone_chat?version=2017-09-21"
@echo ""