@@ -222,7 +222,7 @@ Project create
222
222
import json
223
223
URL = 'https://readthedocs.org/api/v3/projects/'
224
224
TOKEN = '<token>'
225
- HEADERS = {'Authorization' : 'token {}'.format(TOKEN) }
225
+ HEADERS = {'Authorization': f 'token {TOKEN}' }
226
226
data = json.load(open('body.json', 'rb'))
227
227
response = requests.post(
228
228
URL,
@@ -275,7 +275,7 @@ Project update
275
275
import json
276
276
URL = 'https://readthedocs.org/api/v3/projects/pip/'
277
277
TOKEN = '<token>'
278
- HEADERS = {'Authorization' : 'token {}'.format(TOKEN) }
278
+ HEADERS = {'Authorization': f 'token {TOKEN}' }
279
279
data = json.load(open('body.json', 'rb'))
280
280
response = requests.patch(
281
281
URL,
@@ -446,7 +446,7 @@ Version update
446
446
import json
447
447
URL = 'https://readthedocs.org/api/v3/projects/pip/ersion/0.23/'
448
448
TOKEN = '<token>'
449
- HEADERS = {'Authorization' : 'token {}'.format(TOKEN) }
449
+ HEADERS = {'Authorization': f 'token {TOKEN}' }
450
450
data = json.load(open('body.json', 'rb'))
451
451
response = requests.patch(
452
452
URL,
@@ -636,7 +636,7 @@ Build triggering
636
636
import requests
637
637
URL = 'https://readthedocs.org/api/v3/projects/pip/versions/latest/builds/'
638
638
TOKEN = '<token>'
639
- HEADERS = {'Authorization' : 'token {}'.format(TOKEN) }
639
+ HEADERS = {'Authorization': f 'token {TOKEN}' }
640
640
response = requests.post(URL, headers=HEADERS)
641
641
print(response.json())
642
642
@@ -764,11 +764,11 @@ Subproject create
764
764
import json
765
765
URL = 'https://readthedocs.org/api/v3/projects/pip/subprojects/'
766
766
TOKEN = '<token>'
767
- HEADERS = {'Authorization' : 'token {}'.format(TOKEN) }
767
+ HEADERS = {'Authorization': f 'token {TOKEN}' }
768
768
data = json.load(open('body.json', 'rb'))
769
769
response = requests.post(
770
770
URL,
771
- json = data,
771
+ json= data,
772
772
headers=HEADERS,
773
773
)
774
774
print(response.json())
@@ -815,7 +815,7 @@ Subproject delete
815
815
import requests
816
816
URL = 'https://readthedocs.org/api/v3/projects/pip/subprojects/subproject-alias/'
817
817
TOKEN = '<token>'
818
- HEADERS = {'Authorization' : 'token {}'.format(TOKEN) }
818
+ HEADERS = {'Authorization': f 'token {TOKEN}' }
819
819
response = requests.delete(URL, headers=HEADERS)
820
820
print(response.json())
821
821
@@ -975,7 +975,7 @@ Redirect create
975
975
import json
976
976
URL = 'https://readthedocs.org/api/v3/projects/pip/redirects/'
977
977
TOKEN = '<token>'
978
- HEADERS = {'Authorization' : 'token {}'.format(TOKEN) }
978
+ HEADERS = {'Authorization': f 'token {TOKEN}' }
979
979
data = json.load(open('body.json', 'rb'))
980
980
response = requests.post(
981
981
URL,
@@ -1036,7 +1036,7 @@ Redirect update
1036
1036
import json
1037
1037
URL = 'https://readthedocs.org/api/v3/projects/pip/redirects/1/'
1038
1038
TOKEN = '<token>'
1039
- HEADERS = {'Authorization' : 'token {}'.format(TOKEN) }
1039
+ HEADERS = {'Authorization': f 'token {TOKEN}' }
1040
1040
data = json.load(open('body.json', 'rb'))
1041
1041
response = requests.put(
1042
1042
URL,
@@ -1081,7 +1081,7 @@ Redirect delete
1081
1081
import requests
1082
1082
URL = 'https://readthedocs.org/api/v3/projects/pip/redirects/1/'
1083
1083
TOKEN = '<token>'
1084
- HEADERS = {'Authorization' : 'token {}'.format(TOKEN) }
1084
+ HEADERS = {'Authorization': f 'token {TOKEN}' }
1085
1085
response = requests.delete(URL, headers=HEADERS)
1086
1086
print(response.json())
1087
1087
@@ -1197,7 +1197,7 @@ Environment Variable create
1197
1197
import json
1198
1198
URL = 'https://readthedocs.org/api/v3/projects/pip/environmentvariables/'
1199
1199
TOKEN = '<token>'
1200
- HEADERS = {'Authorization' : 'token {}'.format(TOKEN) }
1200
+ HEADERS = {'Authorization': f 'token {TOKEN}' }
1201
1201
data = json.load(open('body.json', 'rb'))
1202
1202
response = requests.post(
1203
1203
URL,
@@ -1244,7 +1244,7 @@ Environment Variable delete
1244
1244
import requests
1245
1245
URL = 'https://readthedocs.org/api/v3/projects/pip/environmentvariables/1/'
1246
1246
TOKEN = '<token>'
1247
- HEADERS = {'Authorization' : 'token {}'.format(TOKEN) }
1247
+ HEADERS = {'Authorization': f 'token {TOKEN}' }
1248
1248
response = requests.delete(URL, headers=HEADERS)
1249
1249
print(response.json())
1250
1250
0 commit comments