aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-02-04 15:59:40 +0100
committerTeddy Wing2018-02-04 15:59:40 +0100
commit8274835cb3791f68924c471dc3009e4a1cbb4ee5 (patch)
treed1d8d3e6b68e901231d8980a19d7a379e9ad1a9a
parent237a9b1ef17286000f0aa27128a6fd68c3d5db2a (diff)
downloadharvester-submit-week-for-approval-8274835cb3791f68924c471dc3009e4a1cbb4ee5.tar.bz2
Include app URL in Harvest API request User-Agentv0.0.1
Harvest requires either a link to the application or an email address to be included in the 'User-Agent' header with requests to their API (https://help.getharvest.com/api-v2/introduction/overview/general/#api-requests).
-rw-r--r--harvester_submit_week_for_approval.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/harvester_submit_week_for_approval.py b/harvester_submit_week_for_approval.py
index f0fa46f..e7dfbb7 100644
--- a/harvester_submit_week_for_approval.py
+++ b/harvester_submit_week_for_approval.py
@@ -142,7 +142,7 @@ class WeekIsComplete(object):
headers={
'Harvest-Account-ID': self.account_id,
'Authorization': 'Bearer {}'.format(self.api_token),
- 'User-Agent': 'harvester-submit-week-for-approval (TODO email address or link to app)',
+ 'User-Agent': 'harvester-submit-week-for-approval (https://github.com/teddywing/harvester-submit-week-for-approval)',
'Content-Type': 'application/json',
},
params={