Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit 26a05cf

Browse files
committed
update examples and README to use == for numberic values
1 parent a930e2c commit 26a05cf

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ Finally, a command that provides more than one error response.
490490
This is simulated by passing an invalid IPv4 address to a DNS record creation.
491491

492492
```
493-
$ cli4 --post name='foo' type=A content="1" /zones/:example.com/dns_records
493+
$ cli4 --post name='foo' type=A content="NOT-A-VALID-IP-ADDRESS" /zones/:example.com/dns_records
494494
cli4: /zones/:example.com/dns_records - 9005 Content for A record is invalid. Must be a valid IPv4 address
495495
cli4: /zones/:example.com/dns_records - 1004 DNS Validation Error
496496
$
@@ -748,6 +748,7 @@ $
748748
The **--raw** command provides access to the paging returned values.
749749
See the API documentation for all the info.
750750
Here's an example of how to page thru a list of zones (it's included in the examples folder as **example_paging_thru_zones.sh**).
751+
Note the use of `==` to pass a number vs a string as paramater.
751752

752753
```bash
753754
:
@@ -756,7 +757,7 @@ trap "rm ${tmp}; exit 0" 0 1 2 15
756757
PAGE=0
757758
while true
758759
do
759-
cli4 --raw per_page=5 page=${PAGE} /zones > ${tmp}
760+
cli4 --raw per_page==5 page==${PAGE} /zones > ${tmp}
760761
domains=`jq -c '.|.result|.[]|.name' < ${tmp} | tr -d '"'`
761762
result_info=`jq -c '.|.result_info' < ${tmp}`
762763
COUNT=` echo "${result_info}" | jq .count`

examples/example_paging_thru_zones.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ while true
99
do
1010
# grab the next page
1111
PAGE_NUMBER=`expr ${PAGE_NUMBER} + 1`
12-
cli4 --raw per_page=5 page=${PAGE_NUMBER} /zones > ${tmp}
12+
cli4 --raw per_page==5 page==${PAGE_NUMBER} /zones > ${tmp}
1313

1414
domains=`jq -c '.|.result|.[]|.name' < ${tmp} | tr -d '"'`
1515
result_info=`jq -c '.|.result_info' < ${tmp}`

examples/example_zone_search.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ SEARCH_TYPES="
2020
for search_type in ${SEARCH_TYPES}
2121
do
2222
echo TRY: "name=${search_type}:${ZONE}"
23-
cli4 per_page=50 name="${search_type}:${ZONE}" ${EXTRA} /zones/ | jq -r '.[]|.id,.name' | paste - -
23+
cli4 per_page==50 name="${search_type}:${ZONE}" ${EXTRA} /zones/ | jq -r '.[]|.id,.name' | paste - -
2424
done
2525

2626
exit 0

0 commit comments

Comments
 (0)