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

Missing "stat" method #11

Closed
tobihagemann opened this issue Feb 16, 2022 · 3 comments · Fixed by #12
Closed

Missing "stat" method #11

tobihagemann opened this issue Feb 16, 2022 · 3 comments · Fixed by #12

Comments

@tobihagemann
Copy link
Contributor

As far as I can see, the API method stat is missing.

Any plans to add it?

@tmpit
Copy link
Member

tmpit commented Feb 16, 2022

I think it should be part of the SDK as it is one of the primary file system methods. I can add this method in the next release. However, I won't be able to work on enhancements to the SDK for a couple of weeks or so.
In the meantime, one alternative I can offer you is to implement it yourself. The SDK is written in a way to allow clients to easily implement API methods that are not part of it. It is a matter of implementing a type conforming to the PCloudAPIMethod protocol and then adding a convenience method in the PCloudClient where you initialize your API method type and create a task via the callTaskBuilder object.

I'm leaving this issue open for the time being.

@tobihagemann
Copy link
Contributor Author

I gave it a go as you've suggested. Just let me know in the PR #12 if I should add/change anything.

@tmpit tmpit closed this as completed in #12 Feb 17, 2022
@tmpit
Copy link
Member

tmpit commented Feb 17, 2022

Thanks for the help! I will only change the name of the method in the PCloudClient to be more consistent with the other methods there.
Also, since I want to add a few other enhancements, I will release a new version with everything in a week or two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants