Dropbox library in LC 9 - centralise the access token?

Mike Kerner MikeKerner at roadrunner.com
Wed Oct 11 20:23:16 CEST 2017

Most of the filestore apps, be they box, dropbox, google drive,
oneDrive, etc. only operate on one account at a time.  That's one of the
nice things about the API's - you can operate on an unlimited number from
your app.

On Wed, Oct 11, 2017 at 2:00 PM, Ben Rubinstein via use-livecode <
use-livecode at lists.runrev.com> wrote:

> > Does Dropbox limit syncing to a single account?
> As far as I know, yes.
> That doesn't mean the API enforces this - only that every app and
> interface I've come across for it does - you log in as a given account, and
> you're operating on that account. There is a folder "~/Dropbox" (or Windows
> equivalent), and that's the synced folder. I don't actually know what
> happens if, for example on a desktop, you log out of one account and into
> another - what it does to the contents of the "Dropbox" folder.
> I assume this is by design - the chief virtue of Dropbox is its simplicity.
> In principle I think that a new app, e.g. built in LiveCode, could
> perfectly happy operate on a number of accounts simultaneously. But my
> proposal in no way prevents that - the code that makes a series of calls to
> the Dropbox API would precede them with a single call to set the relevant
> token, rather than passing that token in every call.  This is how Monte's
> mergDropbox library worked, for example.
> This is also how the AWS library in LC9 works - you call AWSSetCredentials
> first, then all subsequent commands/functions operate on that account,
> until you call AWSSetCredentials again to switch to another one. There
> might be some virtue in consistency!
> In the same way, you make one call to cameracontrol to select which camera
> subsequent calls refer, rather than passing "front" or "back" in every
> call. The same way in the printing library you set the printer you're
> addressing. Etc..
> On 11/10/2017 18:12, Richard Gaskin via use-livecode wrote:
>> Ben Rubinstein wrote:
>>> The new Dropbox library is (going to be) great. But while it's still
>>> only in DP, can I suggest a modest improvement?
>>> Every single command in the library takes an access token as the first
>>> parameter. Given that most uses of the library will involve multiple calls;
>>> and the cases where an app is juggling two different dropbox accounts will
>>> surely be vanishingly small; wouldn't it be much more elegant if there was
>>> a single command "dropboxSetAccessToken" or similar, to normally be used
>>> just once in a session - then every other command would drop that parameter?
>> Does Dropbox limit syncing to a single account?
>> Will Dropbox always have that limitation?
>> FWIW Nextcloud allows any number of folders synced with any number of
>> servers.
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."

More information about the use-livecode mailing list