Skip to content

Commit

Permalink
Updated example to use new API url and call new example query
Browse files Browse the repository at this point in the history
  • Loading branch information
RossRKK committed Sep 25, 2023
1 parent a3f6d6c commit 193b70c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"base_url": "https://appstore.intelligentplant.com"
},
"data_core": {
"base_url": "https://appstore.intelligentplant.com/gestalt"
"base_url": "https://api.intelligentplant.com/datacore"
}
}
11 changes: 8 additions & 3 deletions example/implicit_grant_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ def test_client(token):
print(times)

#writes a value at the current time
writeResults = example_queries.write_snapshot(data_core);
write_snapshot_result = example_queries.write_snapshot(data_core)

#writes a value at a time in the past
write_historical_result = example_queries.write_historical(data_core)


def on_loaded(window):
Expand All @@ -78,9 +81,11 @@ def on_loaded(window):
window.destroy()
#get the access code from the current url
parsed = urllib.parse.urlparse(url)
print(parsed)

access_token = urllib.parse.parse_qs(parsed.fragment)['access_token'][0]
print(access_token)
#test the app store and data core clients
test_client(urllib.parse.parse_qs(parsed.fragment)['access_token'][0])
test_client(access_token)
break

#load the json config file with the app information
Expand Down

0 comments on commit 193b70c

Please sign in to comment.