This commit is contained in:
Brad Ganley
2025-09-30 12:19:36 -05:00
parent 26200aee11
commit b7d0197abb
3 changed files with 28 additions and 32 deletions

1
.gitignore vendored
View File

@@ -174,3 +174,4 @@ cython_debug/
# PyPI configuration file
.pypirc
output.json

View File

@@ -10,22 +10,17 @@ url_base = "portal.gotocompu.com"
print(comp_id,api_pub)
# init client
api_client = ConnectWiseManageAPIClient(
# your company name,
comp_id,
# manage instance url,
url_base,
# your api client id,
client_id,
# your api public key,
api_pub,
# your api private key,
api_priv,
)
thing = api_client.company.contacts.get(params={'fields': 'id'})
thing = api_client.company.companies.get()
print(thing)
with open('output.json', 'w') as f:
for entry in thing:
print(f"{entry}")
print(f"{entry.identifier}\n\n\n\n\n")
f.write(f"{entry}\n\n\n")

File diff suppressed because one or more lines are too long