Пример #1
0
        public async static Task <DropBoxProvider> Instance(DropBoxAccount acc)
        {
            DropBoxProvider provider = new DropBoxProvider();
            await provider.Authenticate(acc);

            return(provider);
        }
Пример #2
0
        private async Task Authenticate(DropBoxAccount acc)
        {
            var options = new DropboxRestAPI.Options
            {
                ClientId     = AppInfo.DropBoxAppId,
                ClientSecret = AppInfo.DropBoxAppSecret,
                AccessToken  = acc.UserToken
            };

            client = new DropboxRestAPI.Client(options);
        }