pCloud / pcloud-sdk-swift

The official pCloud Swift SDK for iOS and macOS for integration with the pCloud API.
MIT License
22 stars 7 forks source link

Missing "stat" method #11

Closed tobihagemann closed 2 years ago

tobihagemann commented 2 years ago

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

Any plans to add it?

tmpit commented 2 years ago

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 commented 2 years ago

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

tmpit commented 2 years ago

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.