Snippets

Team Zoom Python - account balance using json

Updated by Terence Foxcroft

File python-account-balance-using-json.py Modified

  • Ignore whitespace
  • Hide word diff
 if (response.ok):
     print 'Credit balance: ' + str(response.json()['creditBalance'])
 else:
-    print 'Request failed with response code' + response.status_code
+    print 'Request failed with response code' + str(response.status_code)
Updated by Terence Foxcroft

File Python - account balance using json Deleted

  • Ignore whitespace
  • Hide word diff
-# Request the credit balance for an account
-# This script makes use of the Requests Library: http://docs.python-requests.org/en/latest/
-
-import json
-import requests
-
-email_address = 'YOUR_EMAIL_ADDRESS'
-rest_api_token = 'YOUR-API-TOKEN'
-base_url = 'https://www.zoomconnect.com/app/api/rest/v1/'
-
-response = requests.get(base_url + 'account/balance.json', auth=(email_address, rest_api_token))
-
-if (response.ok):
-    print 'Credit balance: ' + str(response.json()['creditBalance'])
-else:
-    print 'Request failed with response code' + response.status_code

File python-account-balance-using-json.py Added

  • Ignore whitespace
  • Hide word diff
+# Request the credit balance for an account
+# This script makes use of the Requests Library: http://docs.python-requests.org/en/latest/
+
+import json
+import requests
+
+email_address = 'YOUR_EMAIL_ADDRESS'
+rest_api_token = 'YOUR-API-TOKEN'
+base_url = 'https://www.zoomconnect.com/app/api/rest/v1/'
+
+response = requests.get(base_url + 'account/balance.json', auth=(email_address, rest_api_token))
+
+if (response.ok):
+    print 'Credit balance: ' + str(response.json()['creditBalance'])
+else:
+    print 'Request failed with response code' + response.status_code
Created by Terence Foxcroft

File Python - account balance using json Added

  • Ignore whitespace
  • Hide word diff
+# Request the credit balance for an account
+# This script makes use of the Requests Library: http://docs.python-requests.org/en/latest/
+
+import json
+import requests
+
+email_address = 'YOUR_EMAIL_ADDRESS'
+rest_api_token = 'YOUR-API-TOKEN'
+base_url = 'https://www.zoomconnect.com/app/api/rest/v1/'
+
+response = requests.get(base_url + 'account/balance.json', auth=(email_address, rest_api_token))
+
+if (response.ok):
+    print 'Credit balance: ' + str(response.json()['creditBalance'])
+else:
+    print 'Request failed with response code' + response.status_code
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.