{"id":13749267,"url":"https://github.com/Astrovic/TiDropboxAPIv2","last_synced_at":"2025-05-09T12:32:38.579Z","repository":{"id":42583325,"uuid":"70321459","full_name":"Astrovic/TiDropboxAPIv2","owner":"Astrovic","description":"Titanium Appcelerator Javascript Dropbox API v2","archived":false,"fork":false,"pushed_at":"2023-07-12T13:16:42.000Z","size":10012,"stargazers_count":14,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-05T13:12:13.261Z","etag":null,"topics":["titanium","titanium-module","titanium-modules"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Astrovic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.txt","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-08T09:47:40.000Z","updated_at":"2023-04-28T16:38:34.000Z","dependencies_parsed_at":"2024-01-17T13:12:30.862Z","dependency_job_id":"e5b1857f-e5d0-4946-bdb3-94319c43855c","html_url":"https://github.com/Astrovic/TiDropboxAPIv2","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrovic%2FTiDropboxAPIv2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrovic%2FTiDropboxAPIv2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrovic%2FTiDropboxAPIv2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrovic%2FTiDropboxAPIv2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Astrovic","download_url":"https://codeload.github.com/Astrovic/TiDropboxAPIv2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253251646,"owners_count":21878539,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["titanium","titanium-module","titanium-modules"],"created_at":"2024-08-03T07:00:58.178Z","updated_at":"2025-05-09T12:32:37.611Z","avatar_url":"https://github.com/Astrovic.png","language":"JavaScript","readme":"\n\n# Titanium Appcelerator Javascript Dropbox API v2\n\nI needed a library that would use the new Dropbox API v2.\nNot finding any, I decided to create this **module/document**, which uses the [Dropbox API v2 HTTP] .\n\nThis module uses OAuth 2.0 authorization token flow, then you must first [create a Dropbox App key].\nFor each API method, it is available the complete documentation and a test. You can also consult the official documentation directly ;)\n\nEnjoy\n\nVittorio Sorbera, AstrovicApps\nhttp://www.astrovicapps.com\n\n## Table of contents\n\n- [Download](#download)\n- [Requirements](#requirements)\n- [tiapp.xml](#tiapp.xml)\n- [Methods](#methods)\n- [Example of use](#example-of-use)\n- [Screenshots](#screenshots)\n- [Todos](#todos)\n- [Guidelines for pull requests](#guidelines-for-pull-requests)\n- [License](#license)\n\n---\n\n## Download\nDownload the [latest release ZIP-file](https://github.com/Astrovic/TiDropboxAPIv2/releases) and consult the [Titanium Documentation](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/Using_Modules/Using_a_Module.html) on how install it.\n\n## Requirements\n-  The  `ti.webdialog`  module\n-  The  [`ti.deeply`](https://github.com/miniman42/ti.deeply)  module (Android only)\n- Dropbox requires a redirect URI set to the Dropbox Console App, in order to get a valid token. This url is the same one you will use in the `redirectUri` parameter of the `TiDropbox.init()` method.\nIn this project I use the redirect URI https://astrovicapps.com/_apptest/tidropbox_cb.html. You will have to create your own and host it somewhere.\nYou can use the contents of my **tidropbox_cb.html** file. You just need to replace `const scheme = \"dropbox\";` with the one used in you **tiapp.xml**:\n\n```html\n\u003c!-- tidropbox_cb.html file content --\u003e\n\u003chtml\u003e\n    \u003chead\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=yes\"\u003e\n    \u003cscript type=\"text/javascript\"\u003e\n        const isAndroid = /(android)/i.test(navigator.userAgent);\n        const isHuawei = /(huawei)/i.test(navigator.userAgent);\n        const urlParams = new URLSearchParams(window.location.search);\n        const code = urlParams.get('code');\n        const scheme = \"tidropbox\"; // \u003c-- Must be the one used in the tiapp.xml public.mime-type string and android:scheme value, and in app_mime_scheme in TiDropbox.init()\n        const host = \"dropbox_token\";\n        var url = scheme + \"://\" + host +\"?\" + (code || window.location.hash);\n        var intent = \"intent://\"+host+\"?\"+ (code || window.location.hash) + \"#Intent;scheme=\"+scheme+\";action=android.intent.action.VIEW;end\";\n        console.log(window.location);\n        console.log(\"isAndroid: --\u003e \", isAndroid);\n        console.log(\"isHuawei: --\u003e \", isHuawei);\n        setTimeout(function(){\n            document.getElementById(\"token\").href = isAndroid || isHuawei ? intent : url;\n            //document.getElementById(\"write_token\").innerText = isAndroid ? intent : url;\n            if (isHuawei) {\n                window.location = intent;\n            } else {\n                window.location = isAndroid ? intent : url;\n            }\n            window.close();\n        },100);\n        function closeWindow() {\n            window.close();\n        }\n    \u003c/script\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdiv style=\"text-align:center;\"\u003e\n        \u003ca id=\"token\" href=\"\" onclick=\"closeWindow()\"\u003e\n            \u003cbutton\u003eOPEN APP\u003c/button\u003e\n        \u003c/a\u003e\n        \u003c!--p id=\"write_token\"\u003e\u003c/p--\u003e\n    \u003c/div\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n## tiapp.xml\nThe login flow to obtain the token requires the use of the system browser. In order to get back to the app, you need to add an activity to your android manifest, which will be used by the **ti.deeply** module, and a public.mime-type string on iOS.\niOS `public.mime-type` key string, Android `android:scheme` value and `app_mime_scheme` value must be the ones you use in the **tidropbox_cb.html** redirect URI file:\n\n|tidropbox_cb.html|tiapp.xml iOS|tiapp.xml Android|TiDropbox.init()|\n|--|--|--|--|\n|`scheme` value|`public.mime-type` key string|`android:scheme` value|`app_mime_scheme` value|\n\n```xml\n\u003cios\u003e\n  \u003cenable-launch-screen-storyboard\u003etrue\u003c/enable-launch-screen-storyboard\u003e\n  \u003cuse-app-thinning\u003etrue\u003c/use-app-thinning\u003e\n  \u003cplist\u003e      \n    \u003ckey\u003eUTExportedTypeDeclarations\u003c/key\u003e\n      \u003carray\u003e\n        \u003cdict\u003e      \t\t\t\n          \u003ckey\u003eUTTypeTagSpecification\u003c/key\u003e\n          \u003cdict\u003e\n            \u003ckey\u003epublic.mime-type\u003c/key\u003e\n            \u003cstring\u003etidropbox\u003c/string\u003e\n          \u003c/dict\u003e\n        \u003c/dict\u003e\n      \u003c/array\u003e\n  \u003c/plist\u003e\n\u003c/ios\u003e\n\u003candroid xmlns:android=\"http://schemas.android.com/apk/res/android\"\u003e\n  \u003cmanifest xmlns:android=\"http://schemas.android.com/apk/res/android\" \u003e\n    \u003capplication\u003e\n      \u003c!-- ti.dropbox required \u003e\u003e\u003e --\u003e\n      \u003cactivity android:name=\"ti.deeply.DeepLinkHandlerActivity\" android:exported=\"true\" \n                android:noHistory=\"true\" android:excludeFromRecents=\"true\" android:launchMode=\"singleTask\"\u003e\n        \u003cintent-filter\u003e\n          \u003caction android:name=\"android.intent.action.VIEW\"/\u003e\n          \u003ccategory android:name=\"android.intent.category.DEFAULT\"/\u003e\n          \u003ccategory android:name=\"android.intent.category.BROWSABLE\"/\u003e\n          \u003cdata android:scheme=\"tidropbox\" android:host=\"dropbox_token\" /\u003e\n        \u003c/intent-filter\u003e      \n      \u003c/activity\u003e\n      \u003c!-- \u003c\u003c\u003c ti.dropbox required --\u003e\n    \u003c/application\u003e\n  \u003c/manifest\u003e\n\u003c/android\u003e\n\n\u003cmodules\u003e\n  \u003cmodule platform=\"commonjs\"\u003eti.dropbox\u003c/module\u003e\n  \u003cmodule\u003eti.webdialog\u003c/module\u003e\n  \u003cmodule platform=\"android\" version=\"3.0.0\"\u003eti.deeply\u003c/module\u003e\n\u003c/modules\u003e\n```\n\n## Methods\n- [init(parameters)](#--init)\n- [generateAuthUrl(callback)](#--generateauthurl)\n- [callMethod(parameters)](#--callmethod)\n- [revokeAccessToken(callback)](#--revokeaccesstoken)\n\n###  - init\n**`TiDropbox.init(parameters)`**\n|Parameters|Type|Required|Description |\n|--|--|--|--|\n| **APP_KEY** | *String* | ✅ | App key in Dropbox Console App|\n| **APP_SECRET** | *String* | ✅ | App secret in Dropbox Console App|\n| **redirectUri** | *String* | ✅ | One of your OAuth2 Redirect URIs set to Dropbox Console App |\n| **response_type** | *String* | ✅ | `code` or `token`. Token flow expires after 4 hours |\n| **app_mime_scheme** | *String* | ✅ | App mime/scheme set to tiapp.xml and used inside your redirect URI page (**https://../tidropbox_cb.html**) to be able to get back to the app after login|\n\nYou need a [Dropbox App key], and a `redirectUri` which must be configured on **Redirect URIs** field of your Dropbox App Settings, on *OAuth 2* section.\n```js\nvar TiDropbox = require(\"ti.dropbox\").TiDropbox;\nTiDropbox.init({\n    APP_KEY: '\u003cYOUR APP KEY HERE\u003e', /*\u003cYOUR APP KEY HERE\u003e*/\n    APP_SECRET: '\u003cYOUR APP SECRET HERE\u003e', /*\u003cYOUR APP SECRET HERE\u003e*/\n    redirectUri: 'https://astrovicapps.com/_apptest/tidropbox_cb.html', /*\u003cYOUR OAuth2 Redirect URI SET TO DROPBOX APP CONSOLE\u003e*/\n    response_type: \"code\", // \"token\" or \"code\". Token flow expires after 4 hours!\n    app_mime_scheme: \"tidropbox\" // *\u003cYOUR APP MIME SCHEME HERE SET TO TIAPP.XML\u003e*/\n});\n```\n### - generateAuthUrl\n**`TiDropbox.generateAuthUrl(callback)`**\n| Callback parameters| Type |Description |\n|--|--|--|\n| **success** | *Boolean* | Response result|\n| **access_token** | *String* | Access token key|\n| **msg** | *String* | Description of the response result |\n\nThis allows you to generate a token to be able to invoke methods.\n\n```js\nTiDropbox.generateAuthUrl(function(e){\n    if(e.success){\n      // I'm logged, now I can call any method\n      Titanium.UI.createAlertDialog({\n          title: \"AUTH SUCCESS\",\n          message: e.msg + \"\\n\" + \"Your access token is: \" + e.access_token,\n          buttonNames: ['OK']\n      }).show();\n    }else{\n      Titanium.UI.createAlertDialog({\n          title: \"AUTH PROBLEM\",\n          message: e.msg,\n          buttonNames: ['OK']\n      }).show();\n    };\n});\n```\n### - callMethod\n**`TiDropbox.callMethod(parameters)`**\n|Parameters|Type|Required|Description |\n|--|--|--|--|\n| **methodStr** | *String* | ✅ | Represent API target. It contains Dropbox's namespace and method name: `\"files/upload\"` or `\"sharing/share_folder\"` or more at [/lib/dropboxAPIv2.js]|\n| **paramsObj** | *Object* | ✅ | Parameters object, depends on resource field|\n| **fileBin** | *Blob/null* | ✅ | File to upload, depends on resource field |\n| **onSuccessCallback** | *Function* | ✅ | Callback on succes |\n| **onErrorCallback** | *Function* | ✅ | Callback on error |\n| **callMethodXhrObjCallback** | *Function* | | Return directly the *TiDropbox.xhr* object of the current `TiDropbox.callMethod`, so you can invoke all xhr methods you need: abort, onload, onsendstream, ecc.. |\n\nAfter obtaining a valid token, you can call any method:\n```js\n// Upload the a.txt file to my app's Dropbox home \nTiDropbox.callMethod({\n    methodStr: \"files/upload\",\n    paramsObj: {\n        path: \"/a.txt\",\n        mode: \"add\",\n        autorename: true,\n        mute: false\n    },\n    fileBin: Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, \"a.txt\").read(),\n    onSuccessCallback: (xhr) =\u003e {\n        console.log(\"onSuccessCallback checkins response-\u003e \" + xhr.responseText);\n    },\n    onErrorCallback: (e) =\u003e {\n        console.error(\"onErrorCallback checkins response-\u003e \" + JSON.stringify(e));\n        if (JSON.stringify(e).indexOf(\"invalid_access_token\") != -1) {\n            //The session has expired, I need a new token };\n            // Do something...\t\t\t\n        }\n    },\n    callMethodXhrObjCallback: (currentCallMethodXhr) =\u003e {\n        currentCallMethodXhr.onsendstream = function (e) {\n            if (e.progress) {\n                console.log(JSON.stringify('Upload progress --\u003e ' + (e.progress * 100) + '%'));\n            }\n        }\n    }\n});\n```\n\n### - revokeAccessToken\n**`TiDropbox.revokeAccessToken(callback)`**\n| Callback parameters| Type |Description |\n|--|--|--|\n| **success** | *Boolean* | Response result|\n| **access_token** | *String* | Access token key|\n| **msg** | *String* | Description of the response result |\n\nRevoke the access token.\n```js\nTiDropbox.revokeAccessToken(function (e) {\n    if (e.success) {\n        // Logout, do something...\n        Titanium.UI.createAlertDialog({\n            title: \"REVOKE AUTH SUCCESS\",\n            message: e.msg,\n            buttonNames: ['OK']\n        }).show();\n    } else {\n        Titanium.UI.createAlertDialog({\n            title: \"REVOKE AUTH PROBLEM\",\n            message: e.msg,\n            buttonNames: ['OK']\n        }).show();\n    };\n});\n```\n\nThat's all! :)\n\n# Example of use\n### File upload\n```js\nvar TiDropbox = require(\"ti.dropbox\").TiDropbox;\nTiDropbox.init({\n    APP_KEY: '\u003cYOUR APP KEY HERE\u003e', /*\u003cYOUR APP KEY HERE\u003e*/\n    APP_SECRET: '\u003cYOUR APP SECRET HERE\u003e', /*\u003cYOUR APP SECRET HERE\u003e*/\n    redirectUri: 'https://astrovicapps.com/_apptest/tidropbox_cb.html', /*\u003cYOUR OAuth2 Redirect URI SET TO DROPBOX APP CONSOLE\u003e*/\n    response_type: \"code\", // \"token\" or \"code\". Token flow expires after 4 hours!\n    app_mime_scheme: \"tidropbox\" // *\u003cYOUR APP MIME SCHEME HERE SET TO TIAPP.XML\u003e*/\n});\n\n// Check if I have a token\nif (Ti.App.Properties.getString('DROPBOX_TOKENS', null)) {\n    login();\n} else {\n    TiDropbox.revokeAccessToken(function () {\n        // Logout, do something...\n    });\n};\n\nfunction login() {\n    TiDropbox.generateAuthUrl(function (e) {\n        if (e.success) {\n            // I'm logged, now I can call any method (/lib/dropboxAPIv2.js)\n            // For example, if I want upload a.txt file on Dropbox App root folder\n            fileUpload();\n        } else {\n            Titanium.UI.createAlertDialog({\n                title: \"AUTH PROBLEM\",\n                message: e.msg,\n                buttonNames: ['OK']\n            }).show();\n        };\n    });\n};\n\nfunction fileUpload() {\n\n    TiDropbox.callMethod({\n        methodStr: \"files/upload\",\n        paramsObj: {\n            path: \"/a.txt\",\n            mode: \"add\",\n            autorename: true,\n            mute: false\n        },\n        fileBin: Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, \"a.txt\").read(),\n        onSuccessCallback: onSuccessCallback,\n        onErrorCallback: onErrorCallback,\n        callMethodXhrObjCallback: callMethodXhrObjCallback\n    });\n\n    // callback functions\n    function onSuccessCallback(xhr) {\n        Ti.API.info(\"onSuccessCallback checkins response-\u003e \" + xhr.responseText);\n        Titanium.UI.createAlertDialog({\n            title: \"METHOD SUCCESS\",\n            message: xhr.responseText,\n            buttonNames: ['OK']\n        }).show();\n    };\n\n    function onErrorCallback(e) {\n        Ti.API.info(\"onErrorCallback checkins response-\u003e \" + JSON.stringify(e));\n        Titanium.UI.createAlertDialog({\n            title: \"METHOD FAILED\",\n            message: JSON.stringify(e),\n            buttonNames: ['OK']\n        }).show();\n        if (JSON.stringify(e).indexOf(\"invalid_access_token\") != -1) {\n            //The session has expired, I need a new token\n            Ti.App.Properties.setString('DROPBOX_TOKENS', null);\n            login();\n        };\n    };\n\n    function callMethodXhrObjCallback(currentCallMethodXhr) {\n        currentCallMethodXhr.onsendstream = function (e) {\n            Ti.API.debug(JSON.stringify(e));\n            if (e.progress) {\n                Ti.API.debug(JSON.stringify('Upload progress --\u003e ' + (e.progress * 100) + '%'));\n            }\n        };\n    };\n};\n```\n\n### File download\n```js\nvar TiDropbox = require(\"ti.dropbox\").TiDropbox;\nTiDropbox.init({\n    APP_KEY: '\u003cYOUR APP KEY HERE\u003e', /*\u003cYOUR APP KEY HERE\u003e*/\n    APP_SECRET: '\u003cYOUR APP SECRET HERE\u003e', /*\u003cYOUR APP SECRET HERE\u003e*/\n    redirectUri: 'https://astrovicapps.com/_apptest/tidropbox_cb.html', /*\u003cYOUR OAuth2 Redirect URI SET TO DROPBOX APP CONSOLE\u003e*/\n    response_type: \"code\", // \"token\" or \"code\". Token flow expires after 4 hours!\n    app_mime_scheme: \"tidropbox\" // *\u003cYOUR APP MIME SCHEME HERE SET TO TIAPP.XML\u003e*/\n});\n\n// Check if I have a token\nif (Ti.App.Properties.getString('DROPBOX_TOKENS', null)) {\n    login();\n} else {\n    TiDropbox.revokeAccessToken(function () {\n        // Logout, do something...\n    });\n};\n\nfunction login() {\n    TiDropbox.generateAuthUrl(function () {\n        if (e.success) {\n            // I'm logged, now I can call any method (/lib/dropboxAPIv2.js)\n            // For example, if I want download Prime_Numbers.txt file from Dropbox App\n            downloadFile();\n        } else {\n            Titanium.UI.createAlertDialog({\n                title: \"AUTH PROBLEM\",\n                message: e.msg,\n                buttonNames: ['OK']\n            }).show();\n        };\n    });\n};\n\nfunction downloadFile() {\n\n    TiDropbox.callMethod({\n        methodStr: \"files/download\",\n        paramsObj: {\n            path: \"/Homework/math/Prime_Numbers.txt\"\n        },\n        fileBin: null,\n        onSuccessCallback: onSuccessCallback,\n        onErrorCallback: onErrorCallback,\n        callMethodXhrObjCallback: callMethodXhrObjCallback\n    });\n\n    // callback functions\n    function onSuccessCallback(xhr) {\n        Ti.API.debug(\"onSuccessCallback checkins response-\u003e \" + xhr.responseText);\n\n        // Write downloaded data in a file\n        if (xhr.responseData) {\n            var filePath = Titanium.Filesystem.applicationDataDirectory + \"myDownloadedFile.txt\";\n            var f = Titanium.Filesystem.getFile(filePath);\n            f.write(xhr.responseData);\n\n            // I check if I saved the file properly\n            setTimeout(function () {\n                Ti.API.debug(filePath + \" exists? ---\u003e \" + file.exists());\n                if (f.exists()) {\n                    if (OS_IOS) {\n                        Ti.UI.iOS.createDocumentViewer({\n                            url: filePath\n                        }).show();\n                    };\n                } else {\n                    Titanium.UI.createAlertDialog({\n                        title: \"DOWNLOAD FAILED\",\n                        message: \"Something went wrong in the file writing...\",\n                        buttonNames: ['OK']\n                    }).show();\n                };\n            }, 1000);\n        };\n    };\n\n    function onErrorCallback(e) {\n        Ti.API.debug(\"onErrorCallback checkins response-\u003e \" + JSON.stringify(e));\n        Titanium.UI.createAlertDialog({\n            title: \"METHOD FAILED\",\n            message: JSON.stringify(e),\n            buttonNames: ['OK']\n        }).show();\n        if (JSON.stringify(e).indexOf(\"invalid_access_token\") != -1) {\n            //The session has expired, I need a new token\n            Ti.App.Properties.setString('DROPBOX_TOKENS', null);\n            login();\n        };\n    };\n\n    function callMethodXhrObjCallback(currentCallMethodXhr) {\n        currentCallMethodXhr.onsendstream = function (e) {\n            if (e.progress) {\n                console.log(JSON.stringify('Upload progress --\u003e ' + (e.progress * 100) + '%'));\n            }\n        }\n    }\n}\n```\n\nDownload and build this project to test other methods\n\n\n# Screenshots\n\n\u003cimg src=\"http://astrovicapps.com/git_source/tidropbox/1.png\" width=\"300px\" style=\"float:left; margin-right:1em;\"\u003e\n\n\u003cimg src=\"http://astrovicapps.com/git_source/tidropbox/2.png\" width=\"300px\" style=\"float:left; margin-right:1em;\"\u003e\n\n\u003cimg src=\"http://astrovicapps.com/git_source/tidropbox/3.png\" width=\"300px\" style=\"float:left; margin-right:1em;\"\u003e\n\n\u003cimg src=\"http://astrovicapps.com/git_source/tidropbox/4.png\" width=\"300px\" style=\"float:left; margin-right:1em;\"\u003e\n\n\u003cimg src=\"http://astrovicapps.com/git_source/tidropbox/5.png\" width=\"300px\" style=\"float:left; margin-right:1em;\"\u003e\n\n\u003cimg src=\"http://astrovicapps.com/git_source/tidropbox/6.png\" width=\"300px\" style=\"float:left; margin-right:1em;\"\u003e\n\n\u003cimg src=\"http://astrovicapps.com/git_source/tidropbox/7.png\" width=\"300px\" style=\"float:left; margin-right:1em;\"\u003e\n\n\n### Todos\n\n - OAauth 2 code flow  ✅ DONE!\n\n# Guidelines for pull requests\n\nEvery contribution and pull requests are welcome! This repository is a **module/document**. So you can contribute both to the documentation, that to new versions of the module.\n\n### Pull requests for new module version\nIf you want to create a new module version, to edit or add new methods, **do not edit the [`modules/`](https://github.com/Astrovic/TiDropboxAPIv2/tree/master/modules) folder directly! But you have to delete [`modules/commonjs`](https://github.com/Astrovic/TiDropboxAPIv2/tree/master/modules/commonjs) folder.** You should edit the\nsource files in [**`/lib`**](https://github.com/Astrovic/TiDropboxAPIv2/tree/master/app/lib) folder instead.\n\nAfter making your changes, to create a new version of the module you have to follow the following steps:\n\n- Increase the version number in [package.json](https://github.com/Astrovic/TiDropboxAPIv2/tree/master/package.json) file, in the root folder.\n- Uses [Titaniumifier](https://github.com/smclab/titaniumifier) to generate the zip module, with the command:\n\n    `$ titaniumifier --in . --out ./dist`\n- Import your new **ti.dropbox-commonjs-x.x.x.zip** module in the project. This will create the [**`modules/commonjs`**](https://github.com/Astrovic/TiDropboxAPIv2/tree/master/modules/commonjs) folder you had removed earlier, with the new version of the module.\n\nAll done :) Now you can send your pull request.\n\nLicense\n----\n**Copyright (c) 2016-23 Vittorio Sorbera, AstrovicApps**\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen. Thanks SO - http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax)\n\n   [Dropbox API v2 HTTP]: \u003chttps://www.dropbox.com/developers/documentation/http/documentation\u003e\n   [create a Dropbox App key]: \u003chttps://www.dropbox.com/developers/apps/create\u003e\n   [Dropbox App key]: \u003chttps://www.dropbox.com/developers/apps\u003e\n   [/lib/dropboxAPIv2.js]: \u003chttps://github.com/Astrovic/TiDropboxAPIv2/blob/master/app/lib/dropboxAPIv2.js\u003e\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAstrovic%2FTiDropboxAPIv2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAstrovic%2FTiDropboxAPIv2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAstrovic%2FTiDropboxAPIv2/lists"}