Skip to content

Commit

Permalink
edits to create historical pt script
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Doherty committed Jun 15, 2018
1 parent a82cd72 commit c069e2a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion python_accept_historical_powertrack_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def accept_job_endpoint():
final_url.add_header('Authorization', 'Basic %s' % base.decode('ascii'))
return final_url

# Create the Endpoint Variable w/ Sample Query Keyword
# Create the Endpoint
job_endpoint = accept_job_endpoint()

# Take in the Endpoint and Make the Request
Expand Down
2 changes: 1 addition & 1 deletion python_check_status_historical_powertrack_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def accept_job_endpoint():
final_url.add_header('Authorization', 'Basic %s' % base.decode('ascii'))
return final_url

# Create the Endpoint Variable w/ Sample Query Keyword
# Create the Endpoint
job_endpoint = accept_job_endpoint()

# Take in the Endpoint and Make the Request
Expand Down
12 changes: 6 additions & 6 deletions python_create_historical_powertrack_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ def create_rules_endpoint():
return final_url

#Take in the Endpoint and Make the Request
def make_request(search_endpoint):
def make_request(job_endpoint):
try:
response = urllib.request.urlopen(search_endpoint)
response = urllib.request.urlopen(job_endpoint)
response_data = response.read()
print("RESPONSE: %s:" % response_data)
except urllib.request.HTTPError as error:
print("ERROR: %s" % error)

# Create the Endpoint Variable w/ Sample Query Keyword
search_endpoint = create_rules_endpoint()
# Create the Endpoint
job_endpoint = create_rules_endpoint()

# Make the Request by Passing in Search Endpoint
make_request(search_endpoint)
# Make the Request
make_request(job_endpoint)

0 comments on commit c069e2a

Please sign in to comment.