We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Aibek D.
10 years agoNew member | Level 1
[SwiftyDropbox] Storing v2 accountId in DropboxAccessToken instead of v1 userId
Not really a critical issue, but for our project it brought some inconveniences. So, currently DropboxAccessToken stores user id from API v1, while Users.Account.accountId stores API v2 account id. ...
Aibek D.
10 years agoNew member | Level 1
Okay, now that I actually implemented "database" that supports API v2, I think that the SwiftyDropbox improvement would be to:
1) Add "v1APIuserId" (or something like this) property to Users.FullAccount, which will contain userId from v1 API.
2) make prepareJSONForSerialization(), objectToJSON() functions public, in order to simplify serialization, caching and storing FullAccount for client code.
Right now, they're private and to implement storing, I ended up with simply copy-pasting those functions.
3) Add explicit initializers for StringSerializer and some other serializers in order to simplify subclassing.
Although StringSerializer is a public class, there's no way client code can use it, because there's no accessible initializers. Ditto for a bunch of other serializers. I also had to copy-paste StringSerializer in order to implement caching.
And, of course, these are just my thoughts, I hope you will consider these thoughts sane and good.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!