Skip to content

Commit e1913fb

Browse files
author
Tony Bedford
committed
Add some more generic examples
1 parent f22e40d commit e1913fb

File tree

5 files changed

+27
-0
lines changed

5 files changed

+27
-0
lines changed

reports/create-async-report.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
3+
source "../config.sh"
4+
5+
curl -X POST "https://api.nexmo.com/v2/reports" \
6+
-H 'Content-Type: application/json; charset=utf-8' \
7+
-u "$NEXMO_API_KEY:$NEXMO_API_SECRET" \
8+
-d $'{
9+
"product": "'$REPORT_PRODUCT'",
10+
"account_id": "'$ACCOUNT_ID'",
11+
"direction": "'$REPORT_DIRECTION'",
12+
"status": "'$REPORT_STATUS'",
13+
"date_start": "'$DATE_START'",
14+
"date_end": "'$DATE_END'"
15+
}'

reports/load-records-sync-dates.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
source "../config.sh"
4+
5+
curl -u "$NEXMO_API_KEY:$NEXMO_API_SECRET" \
6+
"https://api.nexmo.com/v2/reports/records?account_id=$ACCOUNT_ID&product=$REPORT_PRODUCT&direction=$REPORT_DIRECTION&date_start=$DATE_START&date_end=$DATE_END"

reports/load-records-sync-id.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
source "../config.sh"
4+
5+
curl -u "$NEXMO_API_KEY:$NEXMO_API_SECRET" \
6+
"https://api.nexmo.com/v2/reports/records?account_id=$ACCOUNT_ID&product=$REPORT_PRODUCT&direction=$REPORT_DIRECTION&id=$ID"
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)