-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Leverage Encapsulated Functional #13
Labels
Comments
Will be fix in #16 |
allburov
added a commit
that referenced
this issue
Jan 9, 2018
Fix #15 Fix #13 * Add dynamic attribute from _links * remove old repsonse.json * Add Atachment object and download method * try to fix test * escape / * add revisions as property * Add more docs * omit test coverage * duplicate test name * source dir to coverage * rtfm codacy manual * Add docs, deploy on develop\master only * star repo
Fixed in |
ondrno
pushed a commit
to ondrno/tfs
that referenced
this issue
Dec 20, 2018
Fix devopshq#15 Fix devopshq#13 * Add dynamic attribute from _links * remove old repsonse.json * Add Atachment object and download method * try to fix test * escape / * add revisions as property * Add more docs * omit test coverage * duplicate test name * source dir to coverage * rtfm codacy manual * Add docs, deploy on develop\master only * star repo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's an encapsulated functional that doesn't seem to be in the Public API.
More specifically:
workitem._data
which is a dict()workitem._data["relations"]
)Concrete example:
...
logging.info(workitem._data["relations"][-1])
...
STDOUT:
{'rel': 'AttachedFile', 'url': '<uniquely identified link to the file>', 'attributes': {'authorizedDate': '2017-01-09T14:49:32.633Z', 'id': ..., 'resourceCreatedDate': '2017-01-09T14:49:10.473Z', 'resourceModifiedDate': '2017-01-09T14:49:10.473Z', 'revisedDate': '9999-01-01T00:00:00Z', 'resourceSize': 100937, 'name': '<filename>.png'}}
I'm still not sure, but it seems that the ability to work with attached files is already encapsulated.
Another interesting key is
workitem._data["_links"]
, which contains:{'self': {'href': '<link to the workitem in JSON>'}, 'workItemUpdates': {'href': '...'}, 'workItemRevisions': {'href': '...'}, 'workItemHistory': {'href': '<link to workitem's comments in JSON>'}, 'html': {'...'}, 'workItemType': {'...'}, 'fields': {'href': '...'}}
The text was updated successfully, but these errors were encountered: