Skip to content
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

feat: adds content create #155

Merged
merged 1 commit into from
Apr 8, 2024
Merged

feat: adds content create #155

merged 1 commit into from
Apr 8, 2024

Conversation

tdstein
Copy link
Collaborator

@tdstein tdstein commented Apr 3, 2024

Resolves #106

@tdstein tdstein marked this pull request as draft April 3, 2024 19:18
Copy link

github-actions bot commented Apr 3, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
598 520 87% 80% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
src/posit/connect/content.py 76% 🟢
TOTAL 76% 🟢

updated for commit: 1b8b074 by action🐍

@tdstein tdstein marked this pull request as ready for review April 3, 2024 19:31
@tdstein
Copy link
Collaborator Author

tdstein commented Apr 3, 2024

I'll address the docstrings as part of #140

@@ -17,6 +17,10 @@
class ContentItem(Resource):
"""A piece of content."""

@property
def id(self) -> str:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only looking at this since you moved it: should we actually remove this accessor? Is my understanding correct that id is effectively deprecated and that guid is the real identifier you should always use? @aronatkins?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We originally did not include id in the public v1 API. The id was added afterwards in order to help with cross-referencing against the on-disk layout and server logs (which did not include guid at that time).

At this point, it is probably too strong a statement to declare id as deprecated, but it cannot be used to look-up content items using the v1 API.

@tdstein tdstein merged commit f72ced0 into main Apr 8, 2024
8 checks passed
@tdstein tdstein deleted the tdstein/138 branch April 8, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Content.create()
3 participants