Add HarvestUser.person association

importer does not set this; you must do so manually
This commit is contained in:
Lance Edgar 2022-01-30 17:40:19 -06:00
parent 3883a8551f
commit ec78f8c9c4
6 changed files with 210 additions and 8 deletions

View file

@ -167,3 +167,12 @@ class HarvestWebAPI(object):
raise ValueError("must provide all of: {}".format(', '.join(required)))
response = self.post('/time_entries', params=kwargs)
return response.json()
def make_harvest_webapi(config):
access_token = config.require('harvest', 'api.access_token')
account_id = config.require('harvest', 'api.account_id')
user_agent = config.require('harvest', 'api.user_agent')
return HarvestWebAPI(access_token=access_token,
account_id=account_id,
user_agent=user_agent)