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

Add refresh method to Resources? #141

Closed
nealrichardson opened this issue Apr 1, 2024 · 3 comments
Closed

Add refresh method to Resources? #141

nealrichardson opened this issue Apr 1, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@nealrichardson
Copy link
Collaborator

For when you know the object you have is no longer up to date with what's on the server, or you want to make sure it is.

Resources should know their base url and guid is in their data, so I'd expect we could have a method on the base Resource class that should work for all subclasses.

@tdstein
Copy link
Collaborator

tdstein commented Jul 25, 2024

Resolved by #236

@tdstein tdstein closed this as completed Jul 25, 2024
@nealrichardson
Copy link
Collaborator Author

FTR #236 is not what I meant by "refresh" here, but we can revisit when the need arises.

@tdstein
Copy link
Collaborator

tdstein commented Jul 25, 2024

Whoops. I failed to read the description carefully.

Unfortunately, this abstraction isn't as clean as I had hoped. The HTTP method varies by resource. There are variations of PUT, PATCH, and GET. Also, some require additional business logic to accommodate API behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants