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.
Our app has it's own account system and it supports usage of multiple accounts at the same time. Every account can link multiple dropbox accounts and every user can go to a screen where he can add another dropbox account or remove linked dropbox account.
In order for user to understand which dropbox account he unlinks, we use and display e-mails. To get account's email, we make a call to DropboxClient.users.getCurrentAccount(). So far so good.
But making requests takes time. Plus we have our own file browser which supports switching between accounts, and we use e-mails there too. So it makes sense to cache Users.FullAccount in order to have fast access to e-mails.
With API v1 we had a small "database" with DBAccountInfo, where we could make a request "give us a cached account for userId". With API v2 "database" implementation gets harder:
1) Create a subclass of Users.FullAccount, which will have a property "APIv1userId", and create a subclass of FullAccountSerializer
1) get access token, get userId
2) create client with userId, call getCurrentAccount()
3) Create an instance of FullAccount subclass, and use APIv1userId property.
Too much work for something simple as caching and differentiating which account info belongs to which account.
For the same reason I would like to ask you to make functions because we in order to cache FullAccount, we serialize it first.
prepareJSONForSerialization()
objectToJSON()
So, is there a possibility to SwiftyDropbox will use v2 account id in access tokens? This would simplify things a lot and remove one very unclear moment: DropboxAccessToken.userId and FullAccount.accountId are different things. Intuitively, people think that they are the same.
And, of course, if you have a better solution for our "cache database", I will be glad to hear it.
Thanks in advance, Gregory!