aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-02-04 06:50:48 +0100
committerTeddy Wing2018-02-04 06:50:48 +0100
commite8892f1d5c7004b6b8268c7b5c95e6caa80864e6 (patch)
tree6c485f4a60b0d8b6c56b0d114658295dc7ad12c8
parent3245850eaa8f290a1307730b391bea42b6cb6e76 (diff)
downloadharvester-submit-week-for-approval-e8892f1d5c7004b6b8268c7b5c95e6caa80864e6.tar.bz2
Add command line arguments for Harvest account ID and API token
These are required for the `WeekIsComplete` checker.
-rw-r--r--harvester_submit_week_for_approval.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/harvester_submit_week_for_approval.py b/harvester_submit_week_for_approval.py
index b52f6c9..1a395b6 100644
--- a/harvester_submit_week_for_approval.py
+++ b/harvester_submit_week_for_approval.py
@@ -162,6 +162,14 @@ if __name__ == "__main__":
'--subdomain',
required=True,
help='Harvest subdomain (acme in acme.harvestapp.com)')
+ parser.add_argument(
+ '--account-id',
+ required=True,
+ help='Harvest account ID')
+ parser.add_argument(
+ '--api-token',
+ required=True,
+ help='Harvest API token (https://id.getharvest.com/developers)')
args = parser.parse_args()
@@ -169,8 +177,8 @@ if __name__ == "__main__":
# that week
try:
WeekIsComplete(
- account_id='',
- api_token='',
+ account_id=args.account_id,
+ api_token=args.api_token,
friday=most_recent_friday()
).check()
except IncompleteWeekError: