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 permissions find, find_one, and update #145

Merged
merged 4 commits into from
Apr 2, 2024
Merged

Conversation

tdstein
Copy link
Collaborator

@tdstein tdstein commented Apr 2, 2024

Resolves #101

Copy link

github-actions bot commented Apr 2, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
570 495 87% 80% 🟢

New Files

File Coverage Status
src/posit/connect/permissions.py 100% 🟢
TOTAL 100% 🟢

Modified Files

File Coverage Status
src/posit/connect/content.py 75% 🟢
src/posit/connect/resources.py 100% 🟢
src/posit/connect/users.py 100% 🟢
TOTAL 92% 🟢

updated for commit: 5f5a5aa by action🐍

Comment on lines -47 to -74
class Resources(ABC, Generic[T]):
@abstractmethod
def create(self, *args, **kwargs) -> T:
raise NotImplementedError()

@abstractmethod
def delete(self, *args, **kwargs) -> None:
raise NotImplementedError()

@abstractmethod
def find(self, *args, **kwargs) -> List[T]:
raise NotImplementedError()

@abstractmethod
def find_one(self, *args, **kwargs) -> Optional[T]:
raise NotImplementedError()

@abstractmethod
def get(self, *args, **kwargs) -> T:
raise NotImplementedError()

@abstractmethod
def update(self, *args, **kwargs) -> T:
raise NotImplementedError()

@abstractmethod
def count(self, *args, **kwargs) -> int:
raise NotImplementedError()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can cherry-pick this out if needed. I'm realizing that not all API endpoints can support every one of these methods.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Fine by me to leave it here (and I'm always happy about deleting code 😂 )

src/posit/connect/permissions.py Outdated Show resolved Hide resolved
tests/posit/connect/test_permissions.py Outdated Show resolved Hide resolved
@tdstein tdstein merged commit bdfc193 into main Apr 2, 2024
8 checks passed
@tdstein tdstein deleted the tdstein/101 branch April 2, 2024 18:44
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 permissions API wrapper
2 participants