@@ -103,7 +103,7 @@ def main():
103103 cf = CloudFlare.CloudFlare(raw = True )
104104 page_number = 0
105105 while True :
106- page_number += 1
106+ page_number += 1
107107 raw_results = cf.zones.get(params = {' per_page' :5 ,' page' :page_number})
108108 zones = raw_results[' result' ]
109109
@@ -709,22 +709,22 @@ trap "rm ${tmp}; exit 0" 0 1 2 15
709709PAGE=0
710710while true
711711do
712- cli4 --raw per_page=5 page=${PAGE} /zones > ${tmp}
713- domains=` jq -c ' .|.result|.[]|.name' < ${tmp} | tr -d ' "' `
714- result_info=` jq -c ' .|.result_info' < ${tmp} `
715- COUNT=` echo " ${result_info} " | jq .count`
716- PAGE=` echo " ${result_info} " | jq .page`
717- PER_PAGE=` echo " ${result_info} " | jq .per_page`
718- TOTAL_COUNT=` echo " ${result_info} " | jq .total_count`
719- TOTAL_PAGES=` echo " ${result_info} " | jq .total_pages`
720- echo COUNT=${COUNT} PAGE=${PAGE} PER_PAGE=${PER_PAGE} TOTAL_COUNT=${TOTAL_COUNT} TOTAL_PAGES=${TOTAL_PAGES} -- ${domains}
721- if [ " ${PAGE} " == " ${TOTAL_PAGES} " ]
722- then
723- # # last section
724- break
725- fi
726- # grab the next page
727- PAGE=` expr ${PAGE} + 1`
712+ cli4 --raw per_page=5 page=${PAGE} /zones > ${tmp}
713+ domains=` jq -c ' .|.result|.[]|.name' < ${tmp} | tr -d ' "' `
714+ result_info=` jq -c ' .|.result_info' < ${tmp} `
715+ COUNT=` echo " ${result_info} " | jq .count`
716+ PAGE=` echo " ${result_info} " | jq .page`
717+ PER_PAGE=` echo " ${result_info} " | jq .per_page`
718+ TOTAL_COUNT=` echo " ${result_info} " | jq .total_count`
719+ TOTAL_PAGES=` echo " ${result_info} " | jq .total_pages`
720+ echo COUNT=${COUNT} PAGE=${PAGE} PER_PAGE=${PER_PAGE} TOTAL_COUNT=${TOTAL_COUNT} TOTAL_PAGES=${TOTAL_PAGES} -- ${domains}
721+ if [ " ${PAGE} " == " ${TOTAL_PAGES} " ]
722+ then
723+ # # last section
724+ break
725+ fi
726+ # grab the next page
727+ PAGE=` expr ${PAGE} + 1`
728728done
729729```
730730
@@ -875,17 +875,17 @@ The following is documented within the **Advanced** option of the DNS page withi
875875```
876876$ cli4 /zones/:example.com/dns_records/export | egrep -v '^;;|^$'
877877$ORIGIN .
878- @ 3600 IN SOA example.com. root.example.com. (
879- 2025552311 ; serial
880- 7200 ; refresh
881- 3600 ; retry
882- 86400 ; expire
883- 3600) ; minimum
884- example.com. 300 IN NS REPLACE&ME$WITH^YOUR@NAMESERVER.
885- record4.example.com. 300 IN TXT "some text"
886- record3.example.com. 300 IN CNAME record1.example.com.
887- record1.example.com. 300 IN A 10.0.0.1
888- record2.example.com. 300 IN AAAA 2001:d8b::2
878+ @ 3600 IN SOA example.com. root.example.com. (
879+ 2025552311 ; serial
880+ 7200 ; refresh
881+ 3600 ; retry
882+ 86400 ; expire
883+ 3600) ; minimum
884+ example.com. 300 IN NS REPLACE&ME$WITH^YOUR@NAMESERVER.
885+ record4.example.com. 300 IN TXT "some text"
886+ record3.example.com. 300 IN CNAME record1.example.com.
887+ record1.example.com. 300 IN A 10.0.0.1
888+ record2.example.com. 300 IN AAAA 2001:d8b::2
889889$
890890```
891891
@@ -1063,25 +1063,25 @@ Here is the working example of the shell version:
10631063
10641064```
10651065$ examples/example_graphql.sh example.com
1066- 2020-07-14T02:00:00Z 34880
1067- 2020-07-14T03:00:00Z 18953
1068- 2020-07-14T04:00:00Z 28700
1069- 2020-07-14T05:00:00Z 2358
1070- 2020-07-14T06:00:00Z 34905
1071- 2020-07-14T07:00:00Z 779
1072- 2020-07-14T08:00:00Z 35450
1073- 2020-07-14T10:00:00Z 17803
1074- 2020-07-14T11:00:00Z 32678
1075- 2020-07-14T12:00:00Z 19947
1076- 2020-07-14T13:00:00Z 4956
1077- 2020-07-14T14:00:00Z 34585
1078- 2020-07-14T15:00:00Z 3022
1079- 2020-07-14T16:00:00Z 5224
1080- 2020-07-14T18:00:00Z 79482
1081- 2020-07-14T21:00:00Z 10609
1082- 2020-07-14T22:00:00Z 5740
1083- 2020-07-14T23:00:00Z 2545
1084- 2020-07-15T01:00:00Z 10777
1066+ 2020-07-14T02:00:00Z 34880
1067+ 2020-07-14T03:00:00Z 18953
1068+ 2020-07-14T04:00:00Z 28700
1069+ 2020-07-14T05:00:00Z 2358
1070+ 2020-07-14T06:00:00Z 34905
1071+ 2020-07-14T07:00:00Z 779
1072+ 2020-07-14T08:00:00Z 35450
1073+ 2020-07-14T10:00:00Z 17803
1074+ 2020-07-14T11:00:00Z 32678
1075+ 2020-07-14T12:00:00Z 19947
1076+ 2020-07-14T13:00:00Z 4956
1077+ 2020-07-14T14:00:00Z 34585
1078+ 2020-07-14T15:00:00Z 3022
1079+ 2020-07-14T16:00:00Z 5224
1080+ 2020-07-14T18:00:00Z 79482
1081+ 2020-07-14T21:00:00Z 10609
1082+ 2020-07-14T22:00:00Z 5740
1083+ 2020-07-14T23:00:00Z 2545
1084+ 2020-07-15T01:00:00Z 10777
10851085$
10861086```
10871087
0 commit comments