Skip to content

Commit

Permalink
#42: add docs for ws
Browse files Browse the repository at this point in the history
  • Loading branch information
dgroup committed Feb 6, 2022
1 parent 6a3c527 commit e532d0c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,5 @@ dmypy.json
.github/templates/*

.local
/.idea
/.idea
9 changes: 9 additions & 0 deletions g2w/ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ def add_task(self, prj, subj, body) -> dict:
return post(url)

def post_task_url(self, prj, subj, body) -> str:
"""
Construct Worksection API url for new tickets creation
https://worksection.com/faq/api-task.html#q1577
where
- 'WS_URL_POST_TASK' env variable with Worksection endpoint URL
- 'WS_PRJ_{YOUR_PROJECT_ID}_POST_TASK_HASH' env variable with
Worksection md5 hash for this action:
/project/{YOUR_PROJECT_ID}/post_task{YOUR_API_KEY}
"""
url = env("WS_URL_POST_TASK").format(
prj,
subj,
Expand Down

0 comments on commit e532d0c

Please sign in to comment.