ProjectManagerSdk 11.1.2053__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- projectmanagersdk-11.1.2053/.github/workflows/publish.yml +38 -0
- projectmanagersdk-11.1.2053/.gitignore +160 -0
- projectmanagersdk-11.1.2053/LICENSE +21 -0
- projectmanagersdk-11.1.2053/PKG-INFO +16 -0
- projectmanagersdk-11.1.2053/README.md +2 -0
- projectmanagersdk-11.1.2053/pyproject.toml +22 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/apikeyclient.py +162 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/changesetclient.py +93 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/dashboardclient.py +60 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/discussionclient.py +73 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/fileclient.py +89 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/homefileclient.py +83 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/integrationcategoryclient.py +49 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/integrationclient.py +158 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/integrationproviderclient.py +155 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/jiraclient.py +90 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/licenseclient.py +76 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/meclient.py +47 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/projectchargecodeclient.py +49 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/projectclient.py +152 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/projectcustomerclient.py +48 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/projectfieldclient.py +127 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/projectfileclient.py +87 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/projectfolderclient.py +46 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/projectmembersclient.py +132 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/projectpriorityclient.py +53 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/projectstatusclient.py +49 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/projecttemplateclient.py +47 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/resourceclient.py +131 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/resourceskillclient.py +131 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/resourceteamclient.py +130 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/tagclient.py +119 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/taskassigneeclient.py +102 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/taskclient.py +250 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/taskfieldclient.py +200 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/taskfileclient.py +55 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/taskstatusclient.py +130 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/tasktagclient.py +102 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/timesheetclient.py +147 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/userroleclient.py +48 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/clients/workspaceclient.py +81 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/apikeycreatedto.py +30 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/apikeydto.py +50 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/assigneeupsertdto.py +38 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/astroerror.py +44 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/astroresult.py +57 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/authenticationstatusdto.py +31 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/bulktaskcreatedto.py +99 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/changesetgetresponsedto.py +46 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/changesetstatusdto.py +37 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/createintegrationinstancedto.py +32 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/createprojectfielddto.py +44 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/createprojectfieldresponsedto.py +39 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/createresourceskilldto.py +30 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/createresourceteamdto.py +30 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/createtaskfieldrequestdto.py +40 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/dashboardsettingcreatedto.py +46 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/dashboardsettingdto.py +46 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/deleteprojectfielddto.py +39 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/directlinkdto.py +31 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/discussioncreatedto.py +38 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/discussioncreateresponsedto.py +34 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/discussiondto.py +72 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/discussionemoji.py +35 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/filedto.py +96 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/getprojectfieldsresponsedto.py +66 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/gettaskfieldsresponsedto.py +56 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/iddto.py +33 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/integrationcategorydto.py +48 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/integrationdto.py +81 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/integrationinstancedto.py +58 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/integrationproviderdto.py +78 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/licensedto.py +47 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/namedto.py +32 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/newintegrationinstancedto.py +32 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/permissionoptionsdto.py +53 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/projectchargecodedto.py +37 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/projectcreateaccessdto.py +37 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/projectcreateaccessmemberdto.py +35 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/projectcreaterequestdto.py +119 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/projectcreateresponsedto.py +40 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/projectcustomerdto.py +37 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/projectdto.py +155 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/projectfolderdto.py +36 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/projectmanagerdto.py +45 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/projectmemberdto.py +70 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/projectmemberroledto.py +30 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/projectprioritydto.py +38 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/projectstatusdto.py +44 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/projecttemplatecategorydto.py +40 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/projecttemplatedto.py +79 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/projectupdatedto.py +103 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/reactgridlayoutdto.py +51 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/reactgridlayoutitemdto.py +60 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/resourceapproverdto.py +37 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/resourcecreatedto.py +131 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/resourcedto.py +126 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/resourceskilldto.py +38 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/resourceteamdto.py +37 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/resourceupdatedto.py +97 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/retunjiraprojectsdto.py +42 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/tagcreatedto.py +41 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/tagdto.py +46 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/tagupdatedto.py +36 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/taskassigneedto.py +87 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/taskcreatedto.py +111 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/taskdetailsdto.py +155 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/taskdto.py +178 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/taskfieldsvalueresponsedto.py +50 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/taskprioritydto.py +38 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/taskprojectdto.py +43 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/taskstatuscreatedto.py +44 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/taskstatusdto.py +55 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/taskstatusupdatedto.py +44 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/tasktagdto.py +47 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/tasktododto.py +52 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/taskupdatedto.py +116 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/timesheetadmintypedto.py +35 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/timesheetcreaterequestdto.py +55 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/timesheetgetresponsedto.py +62 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/timesheetprojectdto.py +116 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/timesheetresponsedto.py +70 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/timesheettaskdto.py +166 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/timesheetupdaterequestdto.py +35 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/updateprojectfieldvaluedto.py +30 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/updaterequestdto.py +47 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/updateresourceskilldto.py +30 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/updateresourceteamdto.py +30 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/updatetaskfieldvaluedto.py +30 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/userroledto.py +38 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/workspacedto.py +93 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/workspacejoindto.py +35 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/workspacelinksdto.py +36 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/models/workspaceuserinfodto.py +51 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/projectmanagerclient.py +170 -0
- projectmanagersdk-11.1.2053/src/ProjectManagerSdk/test.py +48 -0
- projectmanagersdk-11.1.2053/src/__init__.py +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Upload Python Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
|
|
9
|
+
# Allows you to run this workflow manually from the Actions tab
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
deploy:
|
|
14
|
+
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v2
|
|
19
|
+
- name: Set up Python
|
|
20
|
+
uses: actions/setup-python@v2
|
|
21
|
+
with:
|
|
22
|
+
python-version: '3.x'
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: |
|
|
25
|
+
python -m pip install --upgrade pip
|
|
26
|
+
pip install build
|
|
27
|
+
# - name: Run Pyre
|
|
28
|
+
# run: |
|
|
29
|
+
# python -m pip install pyre-check
|
|
30
|
+
# pyre --source-directory src check
|
|
31
|
+
- name: Build package
|
|
32
|
+
run: python -m build
|
|
33
|
+
- name: Publish package
|
|
34
|
+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
35
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
36
|
+
with:
|
|
37
|
+
user: __token__
|
|
38
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# poetry
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
102
|
+
#poetry.lock
|
|
103
|
+
|
|
104
|
+
# pdm
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
106
|
+
#pdm.lock
|
|
107
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
108
|
+
# in version control.
|
|
109
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
110
|
+
.pdm.toml
|
|
111
|
+
|
|
112
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
113
|
+
__pypackages__/
|
|
114
|
+
|
|
115
|
+
# Celery stuff
|
|
116
|
+
celerybeat-schedule
|
|
117
|
+
celerybeat.pid
|
|
118
|
+
|
|
119
|
+
# SageMath parsed files
|
|
120
|
+
*.sage.py
|
|
121
|
+
|
|
122
|
+
# Environments
|
|
123
|
+
.env
|
|
124
|
+
.venv
|
|
125
|
+
env/
|
|
126
|
+
venv/
|
|
127
|
+
ENV/
|
|
128
|
+
env.bak/
|
|
129
|
+
venv.bak/
|
|
130
|
+
|
|
131
|
+
# Spyder project settings
|
|
132
|
+
.spyderproject
|
|
133
|
+
.spyproject
|
|
134
|
+
|
|
135
|
+
# Rope project settings
|
|
136
|
+
.ropeproject
|
|
137
|
+
|
|
138
|
+
# mkdocs documentation
|
|
139
|
+
/site
|
|
140
|
+
|
|
141
|
+
# mypy
|
|
142
|
+
.mypy_cache/
|
|
143
|
+
.dmypy.json
|
|
144
|
+
dmypy.json
|
|
145
|
+
|
|
146
|
+
# Pyre type checker
|
|
147
|
+
.pyre/
|
|
148
|
+
|
|
149
|
+
# pytype static type analyzer
|
|
150
|
+
.pytype/
|
|
151
|
+
|
|
152
|
+
# Cython debug symbols
|
|
153
|
+
cython_debug/
|
|
154
|
+
|
|
155
|
+
# PyCharm
|
|
156
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
157
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
158
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
159
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
160
|
+
#.idea/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 projectmgr
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: ProjectManagerSdk
|
|
3
|
+
Version: 11.1.2053
|
|
4
|
+
Summary: Software development kit for the ProjectManager.com API for Python
|
|
5
|
+
Project-URL: Homepage, https://github.com/projectmgr/projectmanager-sdk-python
|
|
6
|
+
Project-URL: Bug Tracker, https://github.com/projectmgr/projectmanager-sdk-python/issues
|
|
7
|
+
Author-email: "ProjectManager.com" <support@projectmanager.com>
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Requires-Python: >=3.7
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
|
|
15
|
+
# projectmanager-sdk-python
|
|
16
|
+
ProjectManager.com SDK for Python
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "ProjectManagerSdk"
|
|
3
|
+
version = "11.1.2053"
|
|
4
|
+
authors = [
|
|
5
|
+
{ name = "ProjectManager.com", email = "support@projectmanager.com" }
|
|
6
|
+
]
|
|
7
|
+
description = "Software development kit for the ProjectManager.com API for Python"
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
requires-python = ">=3.7"
|
|
10
|
+
classifiers = [
|
|
11
|
+
"Programming Language :: Python :: 3",
|
|
12
|
+
"License :: OSI Approved :: MIT License",
|
|
13
|
+
"Operating System :: OS Independent",
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
[project.urls]
|
|
17
|
+
"Homepage" = "https://github.com/projectmgr/projectmanager-sdk-python"
|
|
18
|
+
"Bug Tracker" = "https://github.com/projectmgr/projectmanager-sdk-python/issues"
|
|
19
|
+
|
|
20
|
+
[build-system]
|
|
21
|
+
requires = ["hatchling", "find", "requests"]
|
|
22
|
+
build-backend = "hatchling.build"
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
#
|
|
2
|
+
# ProjectManager API for Python
|
|
3
|
+
#
|
|
4
|
+
# (c) 2023-2023 ProjectManager.com, Inc.
|
|
5
|
+
#
|
|
6
|
+
# For the full copyright and license information, please view the LICENSE
|
|
7
|
+
# file that was distributed with this source code.
|
|
8
|
+
#
|
|
9
|
+
# @author ProjectManager.com <support@projectmanager.com>
|
|
10
|
+
# @copyright 2023-2023 ProjectManager.com, Inc.
|
|
11
|
+
# @link https://github.com/projectmgr/projectmanager-sdk-python
|
|
12
|
+
#
|
|
13
|
+
|
|
14
|
+
from models.apikeycreatedto import ApiKeyCreateDto
|
|
15
|
+
from models.apikeydto import ApiKeyDto
|
|
16
|
+
from models.astroresult import AstroResult
|
|
17
|
+
import json
|
|
18
|
+
|
|
19
|
+
class ApiKeyClient:
|
|
20
|
+
"""
|
|
21
|
+
API methods related to ApiKey
|
|
22
|
+
"""
|
|
23
|
+
from projectmanagerclient import ProjectManagerClient
|
|
24
|
+
|
|
25
|
+
def __init__(self, client: ProjectManagerClient):
|
|
26
|
+
self.client = client
|
|
27
|
+
|
|
28
|
+
def create_api_key(self, body: ApiKeyCreateDto) -> AstroResult[ApiKeyDto]:
|
|
29
|
+
"""
|
|
30
|
+
Creates a new API key for the current user with the specified
|
|
31
|
+
options.
|
|
32
|
+
|
|
33
|
+
An API key is a credential that you can use to make REST v4 API
|
|
34
|
+
calls for ProjectManager.com. When you create a new API key,
|
|
35
|
+
that API key is only visible in the response JSON for the
|
|
36
|
+
`CreateApiKey` method. If you do not preserve this information,
|
|
37
|
+
it cannot be recreated.
|
|
38
|
+
|
|
39
|
+
Some best practices for working with API keys: * An API key is
|
|
40
|
+
valid for a two year period after it is created. We encourage
|
|
41
|
+
you to rotate your API keys regularly according to your
|
|
42
|
+
company's security policies. * You should create separate API
|
|
43
|
+
keys for each system that works with your API. If that API key
|
|
44
|
+
is exposed or if that program needs to be shut down, you can
|
|
45
|
+
revoke that one key and reissue it. * An API key is tied to the
|
|
46
|
+
workspace that created it. A single API key can only interact
|
|
47
|
+
with one workspace.
|
|
48
|
+
|
|
49
|
+
Parameters
|
|
50
|
+
----------
|
|
51
|
+
body : ApiKeyCreateDto
|
|
52
|
+
Options for the API key to create
|
|
53
|
+
"""
|
|
54
|
+
path = "/api/data/api-keys"
|
|
55
|
+
queryParams = {}
|
|
56
|
+
result = self.client.send_request("POST", path, body, queryParams, None)
|
|
57
|
+
if result.status_code >= 200 and result.status_code < 300:
|
|
58
|
+
return AstroResult(None, True, False, result.status_code, ApiKeyDto(**json.loads(result.content)['data']))
|
|
59
|
+
else:
|
|
60
|
+
return AstroResult(result.json(), False, True, result.status_code, None)
|
|
61
|
+
|
|
62
|
+
def list_api_keys(self) -> AstroResult[list[ApiKeyDto]]:
|
|
63
|
+
"""
|
|
64
|
+
Returns a list of all API keys within the current workspace.
|
|
65
|
+
|
|
66
|
+
An API key is a credential that you can use to make REST v4 API
|
|
67
|
+
calls for ProjectManager.com. When you create a new API key,
|
|
68
|
+
that API key is only visible in the response JSON for the
|
|
69
|
+
`CreateApiKey` method. If you do not preserve this information,
|
|
70
|
+
it cannot be recreated.
|
|
71
|
+
|
|
72
|
+
Some best practices for working with API keys: * An API key is
|
|
73
|
+
valid for a two year period after it is created. We encourage
|
|
74
|
+
you to rotate your API keys regularly according to your
|
|
75
|
+
company's security policies. * You should create separate API
|
|
76
|
+
keys for each system that works with your API. If that API key
|
|
77
|
+
is exposed or if that program needs to be shut down, you can
|
|
78
|
+
revoke that one key and reissue it. * An API key is tied to the
|
|
79
|
+
workspace that created it. A single API key can only interact
|
|
80
|
+
with one workspace.
|
|
81
|
+
|
|
82
|
+
Parameters
|
|
83
|
+
----------
|
|
84
|
+
"""
|
|
85
|
+
path = "/api/data/api-keys"
|
|
86
|
+
queryParams = {}
|
|
87
|
+
result = self.client.send_request("GET", path, None, queryParams, None)
|
|
88
|
+
if result.status_code >= 200 and result.status_code < 300:
|
|
89
|
+
data = []
|
|
90
|
+
for dict in json.loads(result.content)['data']:
|
|
91
|
+
data.append(ApiKeyDto(**dict))
|
|
92
|
+
return AstroResult(None, True, False, result.status_code, data)
|
|
93
|
+
else:
|
|
94
|
+
return AstroResult(result.json(), False, True, result.status_code, None)
|
|
95
|
+
|
|
96
|
+
def revoke_all_api_keys(self) -> AstroResult[object]:
|
|
97
|
+
"""
|
|
98
|
+
This API call revokes all existing API keys in given workspace.
|
|
99
|
+
No existing keys will continue to work after this call
|
|
100
|
+
completes. We strongly encourage you to revoke a single API key
|
|
101
|
+
at a time; this method should only be used if you need to
|
|
102
|
+
rapidly halt access to your product for automated systems.
|
|
103
|
+
|
|
104
|
+
An API key is a credential that you can use to make REST v4 API
|
|
105
|
+
calls for ProjectManager.com. When you create a new API key,
|
|
106
|
+
that API key is only visible in the response JSON for the
|
|
107
|
+
`CreateApiKey` method. If you do not preserve this information,
|
|
108
|
+
it cannot be recreated.
|
|
109
|
+
|
|
110
|
+
Some best practices for working with API keys: * An API key is
|
|
111
|
+
valid for a two year period after it is created. We encourage
|
|
112
|
+
you to rotate your API keys regularly according to your
|
|
113
|
+
company's security policies. * You should create separate API
|
|
114
|
+
keys for each system that works with your API. If that API key
|
|
115
|
+
is exposed or if that program needs to be shut down, you can
|
|
116
|
+
revoke that one key and reissue it. * An API key is tied to the
|
|
117
|
+
workspace that created it. A single API key can only interact
|
|
118
|
+
with one workspace.
|
|
119
|
+
|
|
120
|
+
Parameters
|
|
121
|
+
----------
|
|
122
|
+
"""
|
|
123
|
+
path = "/api/data/api-keys/revoke-all"
|
|
124
|
+
queryParams = {}
|
|
125
|
+
result = self.client.send_request("DELETE", path, None, queryParams, None)
|
|
126
|
+
if result.status_code >= 200 and result.status_code < 300:
|
|
127
|
+
return AstroResult(None, True, False, result.status_code, object(**json.loads(result.content)['data']))
|
|
128
|
+
else:
|
|
129
|
+
return AstroResult(result.json(), False, True, result.status_code, None)
|
|
130
|
+
|
|
131
|
+
def revoke_api_key(self, id: str) -> AstroResult[object]:
|
|
132
|
+
"""
|
|
133
|
+
Revokes a single API key in the current workspace.
|
|
134
|
+
|
|
135
|
+
An API key is a credential that you can use to make REST v4 API
|
|
136
|
+
calls for ProjectManager.com. When you create a new API key,
|
|
137
|
+
that API key is only visible in the response JSON for the
|
|
138
|
+
`CreateApiKey` method. If you do not preserve this information,
|
|
139
|
+
it cannot be recreated.
|
|
140
|
+
|
|
141
|
+
Some best practices for working with API keys: * An API key is
|
|
142
|
+
valid for a two year period after it is created. We encourage
|
|
143
|
+
you to rotate your API keys regularly according to your
|
|
144
|
+
company's security policies. * You should create separate API
|
|
145
|
+
keys for each system that works with your API. If that API key
|
|
146
|
+
is exposed or if that program needs to be shut down, you can
|
|
147
|
+
revoke that one key and reissue it. * An API key is tied to the
|
|
148
|
+
workspace that created it. A single API key can only interact
|
|
149
|
+
with one workspace.
|
|
150
|
+
|
|
151
|
+
Parameters
|
|
152
|
+
----------
|
|
153
|
+
id : str
|
|
154
|
+
The unique identifier of the API key to revoke
|
|
155
|
+
"""
|
|
156
|
+
path = f"/api/data/api-keys/{id}/revoke"
|
|
157
|
+
queryParams = {}
|
|
158
|
+
result = self.client.send_request("DELETE", path, None, queryParams, None)
|
|
159
|
+
if result.status_code >= 200 and result.status_code < 300:
|
|
160
|
+
return AstroResult(None, True, False, result.status_code, object(**json.loads(result.content)['data']))
|
|
161
|
+
else:
|
|
162
|
+
return AstroResult(result.json(), False, True, result.status_code, None)
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#
|
|
2
|
+
# ProjectManager API for Python
|
|
3
|
+
#
|
|
4
|
+
# (c) 2023-2023 ProjectManager.com, Inc.
|
|
5
|
+
#
|
|
6
|
+
# For the full copyright and license information, please view the LICENSE
|
|
7
|
+
# file that was distributed with this source code.
|
|
8
|
+
#
|
|
9
|
+
# @author ProjectManager.com <support@projectmanager.com>
|
|
10
|
+
# @copyright 2023-2023 ProjectManager.com, Inc.
|
|
11
|
+
# @link https://github.com/projectmgr/projectmanager-sdk-python
|
|
12
|
+
#
|
|
13
|
+
|
|
14
|
+
from models.astroresult import AstroResult
|
|
15
|
+
from models.changesetgetresponsedto import ChangesetGetResponseDto
|
|
16
|
+
import json
|
|
17
|
+
|
|
18
|
+
class ChangesetClient:
|
|
19
|
+
"""
|
|
20
|
+
API methods related to Changeset
|
|
21
|
+
"""
|
|
22
|
+
from projectmanagerclient import ProjectManagerClient
|
|
23
|
+
|
|
24
|
+
def __init__(self, client: ProjectManagerClient):
|
|
25
|
+
self.client = client
|
|
26
|
+
|
|
27
|
+
def retrieve_changeset(self, changeSetId: str) -> AstroResult[ChangesetGetResponseDto]:
|
|
28
|
+
"""
|
|
29
|
+
Retrieve a Changeset by its unique ID.
|
|
30
|
+
|
|
31
|
+
A Changeset is an individual edit that has been made to a
|
|
32
|
+
project. Since multiple users can edit a project at the same
|
|
33
|
+
time, individual Changesets are applied in a sequential fashion.
|
|
34
|
+
If a Changeset causes a conflict or cannot be applied, it will
|
|
35
|
+
be rejected. You can examine a Changeset to determine its
|
|
36
|
+
conflict resolution status.
|
|
37
|
+
|
|
38
|
+
When checking the status of a Changeset, you can call either
|
|
39
|
+
RetrieveChangeset or RetrieveCompletedChangeset. Using
|
|
40
|
+
RetrieveChangeset will give you the immediate status of the
|
|
41
|
+
Changeset. Using RetrieveCompletedChangeset will delay the
|
|
42
|
+
response until the Changeset has finished processing.
|
|
43
|
+
|
|
44
|
+
Parameters
|
|
45
|
+
----------
|
|
46
|
+
changeSetId : str
|
|
47
|
+
The unique ID number of the Changeset to retrieve
|
|
48
|
+
"""
|
|
49
|
+
path = f"/api/data/changesets/{changeSetId}"
|
|
50
|
+
queryParams = {}
|
|
51
|
+
result = self.client.send_request("GET", path, None, queryParams, None)
|
|
52
|
+
if result.status_code >= 200 and result.status_code < 300:
|
|
53
|
+
return AstroResult(None, True, False, result.status_code, ChangesetGetResponseDto(**json.loads(result.content)['data']))
|
|
54
|
+
else:
|
|
55
|
+
return AstroResult(result.json(), False, True, result.status_code, None)
|
|
56
|
+
|
|
57
|
+
def retrieve_completed_changeset(self, changeSetId: str) -> AstroResult[ChangesetGetResponseDto]:
|
|
58
|
+
"""
|
|
59
|
+
Retrieve a Changeset by its unique ID. This endpoint waits for
|
|
60
|
+
the Changeset to complete its processing prior to returning a
|
|
61
|
+
result.
|
|
62
|
+
|
|
63
|
+
A Changeset is an individual edit that has been made to a
|
|
64
|
+
project. Since multiple users can edit a project at the same
|
|
65
|
+
time, individual Changesets are applied in a sequential fashion.
|
|
66
|
+
If a Changeset causes a conflict or cannot be applied, it will
|
|
67
|
+
be rejected. You can examine a Changeset to determine its
|
|
68
|
+
conflict resolution status.
|
|
69
|
+
|
|
70
|
+
When checking the status of a Changeset, you can call either
|
|
71
|
+
RetrieveChangeset or RetrieveCompletedChangeset. Using
|
|
72
|
+
RetrieveChangeset will give you the immediate status of the
|
|
73
|
+
Changeset. Using RetrieveCompletedChangeset will delay the
|
|
74
|
+
response until the Changeset has finished processing.
|
|
75
|
+
|
|
76
|
+
Although most Changesets complete instantly, some Changesets may
|
|
77
|
+
need additional time to complete. If the Changeset cannot be
|
|
78
|
+
processed within a reasonable length of time, this API call may
|
|
79
|
+
fail. If this API fails, it will return a status error
|
|
80
|
+
indicating the Changeset is still being processed.
|
|
81
|
+
|
|
82
|
+
Parameters
|
|
83
|
+
----------
|
|
84
|
+
changeSetId : str
|
|
85
|
+
The unique ID number of the Changeset to retrieve
|
|
86
|
+
"""
|
|
87
|
+
path = f"/api/data/changesets/{changeSetId}/poll"
|
|
88
|
+
queryParams = {}
|
|
89
|
+
result = self.client.send_request("GET", path, None, queryParams, None)
|
|
90
|
+
if result.status_code >= 200 and result.status_code < 300:
|
|
91
|
+
return AstroResult(None, True, False, result.status_code, ChangesetGetResponseDto(**json.loads(result.content)['data']))
|
|
92
|
+
else:
|
|
93
|
+
return AstroResult(result.json(), False, True, result.status_code, None)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#
|
|
2
|
+
# ProjectManager API for Python
|
|
3
|
+
#
|
|
4
|
+
# (c) 2023-2023 ProjectManager.com, Inc.
|
|
5
|
+
#
|
|
6
|
+
# For the full copyright and license information, please view the LICENSE
|
|
7
|
+
# file that was distributed with this source code.
|
|
8
|
+
#
|
|
9
|
+
# @author ProjectManager.com <support@projectmanager.com>
|
|
10
|
+
# @copyright 2023-2023 ProjectManager.com, Inc.
|
|
11
|
+
# @link https://github.com/projectmgr/projectmanager-sdk-python
|
|
12
|
+
#
|
|
13
|
+
|
|
14
|
+
from models.astroresult import AstroResult
|
|
15
|
+
from models.dashboardsettingcreatedto import DashboardSettingCreateDto
|
|
16
|
+
from models.dashboardsettingdto import DashboardSettingDto
|
|
17
|
+
import json
|
|
18
|
+
|
|
19
|
+
class DashboardClient:
|
|
20
|
+
"""
|
|
21
|
+
API methods related to Dashboard
|
|
22
|
+
"""
|
|
23
|
+
from projectmanagerclient import ProjectManagerClient
|
|
24
|
+
|
|
25
|
+
def __init__(self, client: ProjectManagerClient):
|
|
26
|
+
self.client = client
|
|
27
|
+
|
|
28
|
+
def retrieve_dashboard_user_settings(self, type: str) -> AstroResult[DashboardSettingDto]:
|
|
29
|
+
"""
|
|
30
|
+
Returns user dashboard settings
|
|
31
|
+
|
|
32
|
+
Parameters
|
|
33
|
+
----------
|
|
34
|
+
type : str
|
|
35
|
+
The dashboard type that is not custom
|
|
36
|
+
"""
|
|
37
|
+
path = f"/api/data/dashboards/settings/{type}"
|
|
38
|
+
queryParams = {}
|
|
39
|
+
result = self.client.send_request("GET", path, None, queryParams, None)
|
|
40
|
+
if result.status_code >= 200 and result.status_code < 300:
|
|
41
|
+
return AstroResult(None, True, False, result.status_code, DashboardSettingDto(**json.loads(result.content)['data']))
|
|
42
|
+
else:
|
|
43
|
+
return AstroResult(result.json(), False, True, result.status_code, None)
|
|
44
|
+
|
|
45
|
+
def create_or_update_user_dashboard_settings(self, body: DashboardSettingCreateDto) -> AstroResult[DashboardSettingDto]:
|
|
46
|
+
"""
|
|
47
|
+
Create or Update User Dashboard Settings
|
|
48
|
+
|
|
49
|
+
Parameters
|
|
50
|
+
----------
|
|
51
|
+
body : DashboardSettingCreateDto
|
|
52
|
+
User dashboard settings object
|
|
53
|
+
"""
|
|
54
|
+
path = "/api/data/dashboards/settings"
|
|
55
|
+
queryParams = {}
|
|
56
|
+
result = self.client.send_request("POST", path, body, queryParams, None)
|
|
57
|
+
if result.status_code >= 200 and result.status_code < 300:
|
|
58
|
+
return AstroResult(None, True, False, result.status_code, DashboardSettingDto(**json.loads(result.content)['data']))
|
|
59
|
+
else:
|
|
60
|
+
return AstroResult(result.json(), False, True, result.status_code, None)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#
|
|
2
|
+
# ProjectManager API for Python
|
|
3
|
+
#
|
|
4
|
+
# (c) 2023-2023 ProjectManager.com, Inc.
|
|
5
|
+
#
|
|
6
|
+
# For the full copyright and license information, please view the LICENSE
|
|
7
|
+
# file that was distributed with this source code.
|
|
8
|
+
#
|
|
9
|
+
# @author ProjectManager.com <support@projectmanager.com>
|
|
10
|
+
# @copyright 2023-2023 ProjectManager.com, Inc.
|
|
11
|
+
# @link https://github.com/projectmgr/projectmanager-sdk-python
|
|
12
|
+
#
|
|
13
|
+
|
|
14
|
+
from models.astroresult import AstroResult
|
|
15
|
+
from models.discussioncreatedto import DiscussionCreateDto
|
|
16
|
+
from models.discussioncreateresponsedto import DiscussionCreateResponseDto
|
|
17
|
+
from models.discussiondto import DiscussionDto
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
class DiscussionClient:
|
|
21
|
+
"""
|
|
22
|
+
API methods related to Discussion
|
|
23
|
+
"""
|
|
24
|
+
from projectmanagerclient import ProjectManagerClient
|
|
25
|
+
|
|
26
|
+
def __init__(self, client: ProjectManagerClient):
|
|
27
|
+
self.client = client
|
|
28
|
+
|
|
29
|
+
def retrieve_task_comments(self, taskId: str) -> AstroResult[list[DiscussionDto]]:
|
|
30
|
+
"""
|
|
31
|
+
Retrieve all comments written about a task
|
|
32
|
+
|
|
33
|
+
Parameters
|
|
34
|
+
----------
|
|
35
|
+
taskId : str
|
|
36
|
+
The unique ID number of the task to retrieve comments
|
|
37
|
+
"""
|
|
38
|
+
path = f"/api/data/tasks/{taskId}/discussions"
|
|
39
|
+
queryParams = {}
|
|
40
|
+
result = self.client.send_request("GET", path, None, queryParams, None)
|
|
41
|
+
if result.status_code >= 200 and result.status_code < 300:
|
|
42
|
+
data = []
|
|
43
|
+
for dict in json.loads(result.content)['data']:
|
|
44
|
+
data.append(DiscussionDto(**dict))
|
|
45
|
+
return AstroResult(None, True, False, result.status_code, data)
|
|
46
|
+
else:
|
|
47
|
+
return AstroResult(result.json(), False, True, result.status_code, None)
|
|
48
|
+
|
|
49
|
+
def create_task_comments(self, taskId: str, body: DiscussionCreateDto) -> AstroResult[DiscussionCreateResponseDto]:
|
|
50
|
+
"""
|
|
51
|
+
Adds a Markdown-formatted comment to a task.
|
|
52
|
+
|
|
53
|
+
Tasks can have discussions attached to them. These discussions
|
|
54
|
+
can include text with simple formatting. Discussion comments are
|
|
55
|
+
formatted using [Markdown](https://www.markdownguide.org/) and
|
|
56
|
+
users should be aware that HTML embedding is not permitted due
|
|
57
|
+
to the risk of cross-site attacks and other embedding
|
|
58
|
+
challenges.
|
|
59
|
+
|
|
60
|
+
Parameters
|
|
61
|
+
----------
|
|
62
|
+
taskId : str
|
|
63
|
+
The unique ID number of the task being commented upon
|
|
64
|
+
body : DiscussionCreateDto
|
|
65
|
+
The Markdown-formatted text of the comment
|
|
66
|
+
"""
|
|
67
|
+
path = f"/api/data/tasks/{taskId}/discussions"
|
|
68
|
+
queryParams = {}
|
|
69
|
+
result = self.client.send_request("POST", path, body, queryParams, None)
|
|
70
|
+
if result.status_code >= 200 and result.status_code < 300:
|
|
71
|
+
return AstroResult(None, True, False, result.status_code, DiscussionCreateResponseDto(**json.loads(result.content)['data']))
|
|
72
|
+
else:
|
|
73
|
+
return AstroResult(result.json(), False, True, result.status_code, None)
|