@@ -15,7 +15,7 @@ The CloudFlare API can be found [here](https://api.cloudflare.com/). Each API ca
1515
1616## Installation
1717
18- ```
18+ ``` bash
1919 ./setup.py build
2020 sudo ./setup.py install
2121```
@@ -26,7 +26,7 @@ Or whatever variance of that you want to use.
2626
2727A very simple listing of zones within your account; including the IPv6 status of the zone.
2828
29- ```
29+ ``` python
3030import CloudFlare
3131
3232def main ():
@@ -47,7 +47,7 @@ if __name__ == '__main__':
4747
4848A more complex example follows.
4949
50- ```
50+ ``` python
5151import sys
5252import CloudFlare
5353
@@ -104,7 +104,7 @@ If the account email and API key are not passed when you create the class, then
104104There is one call that presently doesn't need any email or token certification (the * /ips* call); hence you can test without any values saved away.
105105
106106### Using shell environment variables
107- ```
107+ ``` bash
108108$ export CF_API_EMAIL=' user@example.com'
109109$ export CF_API_KEY=' 00000000000000000000000000000000'
110110$ export CF_API_CERTKEY=' v1.0-...'
113113
114114### Using configuration file to store email and keys
115115
116- ```
116+ ``` bash
117117$ cat ~ /.cloudflare/cloudflare.cfg
118118[CloudFlare]
119119email = user@example.com
@@ -130,7 +130,7 @@ The *examples* folder contains many examples in both simple and verbose formats.
130130
131131## A DNS zone code example
132132
133- ```
133+ ``` python
134134# !/usr/bin/env python
135135
136136import sys
@@ -162,7 +162,7 @@ if __name__ == '__main__':
162162
163163All API calls can be called from the command line. The command will convert domain names on-the-fly into zone_identifier's.
164164
165- ```
165+ ``` bash
166166$ cli4 [-h| --help] [-v| --verbose] [-q| --quiet] [--get| --patch| --post| -put| --delete] [item= value ...] /command...
167167```
168168
@@ -186,7 +186,7 @@ The output from the CLI command is in json format (and human readable).
186186
187187### More complex CLI examples
188188
189- ```
189+ ``` bash
190190$ cli4 --delete purge_everything=true /zones/:example.com/purge_cache | jq -c .
191191{" id" :" d8afaec3dd2b7f8c1b470e594a21a01d" }
192192$
@@ -204,7 +204,7 @@ cli4: /zones/:example.com/purge_cache - 1107 Only enterprise zones can purge by
204204$
205205```
206206
207- ```
207+ ```bash
208208$ cli4 /zones/:example.com/available_plans | jq -c ' .[]| {" id" :.id," name" :.name}'
209209{"id":"a577b510288e82b26486fd1df47000ec","name":"Pro Website"}
210210{"id":"1ac039f6c29b691475c3d74fe588d1ae","name":"Business Website"}
215215
216216### DNSSEC CLI examples
217217
218- ```
218+ ```bash
219219$ cli4 /zones/:example.com/dnssec | jq -c ' {" status" :.status}'
220220{"status":"disabled"}
221221$
451451## Adding extra API calls manually
452452
453453Extra API calls can be added via the configuration file
454- ```
454+ ```bash
455455$ cat ~/.cloudflare/cloudflare.cfg
456456[CloudFlare]
457457extras=
0 commit comments