Skip to content

A Python wrapper for the Harvest time-tracking API.

License

Notifications You must be signed in to change notification settings

GoIncremental/python-harvest

 
 

Repository files navigation

#Python Harvest API Client

###How to use: >>> import harvest >>> harvest.HarvestStatus().get() u'up' >>> client = harvest.Harvest("https://COMPANYNAME.harvestapp.com", "EMAIL", "PASSWORD") >>> data = {"notes":"test note", "project_id":"PROJECT_ID","hours":"1.0", "task_id": "TASK_ID"} >>> client.add(data) >>> data['notes'] = "another test" >>> client.update("ENTRY_ID", data) >>> client.get_today()

###How to use OAuth2: >>> import harvest >>> harvest.HarvestStatus().get() u'up' client_id = 'YOUR HARVEST CLIENT ID' token = { 'token_type': 'bearer' 'access_token': 'YOUR ACCESS TOKEN', 'refresh_token': 'YOUR REFRESH TOKEN', 'expires_at': 'UNIX TIMESTAMP WHEN TOKEN EXPIRES', } >>> client = harvest.Harvest("https://COMPANYNAME.harvestapp.com", client_id=client_id token=token) >>> data = {"notes":"test note", "project_id":"PROJECT_ID","hours":"1.0", "task_id": "TASK_ID"} >>> client.add(data) >>> data['notes'] = "another test" >>> client.update("ENTRY_ID", data) >>> client.get_today()

About

A Python wrapper for the Harvest time-tracking API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%