()
| 7 | key: 'c6oex2qavccb2l3' |
| 8 | }), |
| 9 | auth = () => { |
| 10 | init_client.authenticate((error: Dropbox.AuthError | Dropbox.ApiError, authed_client: Dropbox.Client) => { |
| 11 | if (error) { |
| 12 | console.error('Error: could not connect to Dropbox'); |
| 13 | console.error(error); |
| 14 | return cb('Dropbox', []); |
| 15 | } |
| 16 | |
| 17 | authed_client.getAccountInfo((error, info) => { |
| 18 | console.debug("Successfully connected to " + info.name + "'s Dropbox"); |
| 19 | }); |
| 20 | |
| 21 | DropboxFileSystem.Create({ |
| 22 | client: authed_client |
| 23 | }, (e, fs) => { |
| 24 | if (e) { |
| 25 | throw e; |
| 26 | } else { |
| 27 | fs.empty((e) => { |
| 28 | if (e) { |
| 29 | throw e; |
| 30 | } else { |
| 31 | cb('Dropbox', [fs]); |
| 32 | } |
| 33 | }); |
| 34 | } |
| 35 | }); |
| 36 | }); |
| 37 | }; |
| 38 | |
| 39 | // Authenticate with pregenerated unit testing credentials. |
| 40 | var req = new XMLHttpRequest(); |
no test coverage detected