Skip to content

Commit

Permalink
Merge pull request #29 from derekargueta/master
Browse files Browse the repository at this point in the history
Updated diagnexample for v2 API
  • Loading branch information
J.G committed Jul 13, 2018
2 parents 79aca62 + b302b9e commit 3cef1ab
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ visit the `Akamai {OPEN} Developer Community`_.
access_token='aaaaaaaaaaaaaaaaaaaaa'
)
>>> result = s.get(urljoin(baseurl, '/diagnostic-tools/v1/locations'))
>>> result = s.get(urljoin(baseurl, '/diagnostic-tools/v2/ghost-locations/available'))
>>> result.status_code
200
>>> result.json()['locations'][0]
Hongkong, Hong Kong
>>> result.json()['locations'][0]['value']
Oakbrook, IL, United States
...
Alternatively, your program can read the credentials from an .edgerc file.
Expand All @@ -40,11 +40,11 @@ Alternatively, your program can read the credentials from an .edgerc file.
>>> s = requests.Session()
>>> s.auth = EdgeGridAuth.from_edgerc(edgerc, section)
>>> result = s.get(urljoin(baseurl, '/diagnostic-tools/v1/locations'))
>>> result = s.get(urljoin(baseurl, '/diagnostic-tools/v2/ghost-locations/available'))
>>> result.status_code
200
>>> result.json()['locations'][0]
Hongkong, Hong Kong
>>> result.json()['locations'][0]['value']
Oakbrook, IL, United States
...
.. _`requests`: http://docs.python-requests.org
Expand Down

0 comments on commit 3cef1ab

Please sign in to comment.