Created
July 25, 2015 18:46
-
-
Save netmanchris/1e2d7ff8f2d0a30826d1 to your computer and use it in GitHub Desktop.
Get Custom Views
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_custom_views(): | |
# checks to see if the imc credentials are already available | |
if auth == None or url == None: | |
imc_creds() | |
get_custom_view_url = '/imcrs/plat/res/view/custom?resPrivilegeFilter=false&desc=false&total=false' | |
f_url = url + get_custom_view_url | |
# creates the URL using the payload variable as the contents | |
r = requests.get(f_url, auth=auth, headers=headers) | |
if r.status_code == 200: | |
view_list = (json.loads(r.text))["customView"] | |
return view_list | |
else: | |
print("An Error has occured") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment