dropbox_api 0.1.14 → 0.1.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (268) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -1
  3. data/.yardopts +1 -0
  4. data/docs/DropboxApi.html +135 -0
  5. data/docs/DropboxApi/Authenticator.html +217 -0
  6. data/docs/DropboxApi/ChunkedUploader.html +409 -0
  7. data/docs/DropboxApi/Client.html +8747 -0
  8. data/docs/DropboxApi/ConnectionBuilder.html +326 -0
  9. data/docs/DropboxApi/Endpoints.html +119 -0
  10. data/docs/DropboxApi/Endpoints/Auth.html +115 -0
  11. data/docs/DropboxApi/Endpoints/Auth/TokenRevoke.html +265 -0
  12. data/docs/DropboxApi/Endpoints/Base.html +197 -0
  13. data/docs/DropboxApi/Endpoints/ContentDownload.html +383 -0
  14. data/docs/DropboxApi/Endpoints/ContentUpload.html +351 -0
  15. data/docs/DropboxApi/Endpoints/Files.html +117 -0
  16. data/docs/DropboxApi/Endpoints/Files/Copy.html +323 -0
  17. data/docs/DropboxApi/Endpoints/Files/CopyReferenceGet.html +304 -0
  18. data/docs/DropboxApi/Endpoints/Files/CopyReferenceSave.html +320 -0
  19. data/docs/DropboxApi/Endpoints/Files/CreateFileRequest.html +307 -0
  20. data/docs/DropboxApi/Endpoints/Files/CreateFolder.html +305 -0
  21. data/docs/DropboxApi/Endpoints/Files/Delete.html +341 -0
  22. data/docs/DropboxApi/Endpoints/Files/Download.html +284 -0
  23. data/docs/DropboxApi/Endpoints/Files/GetMetadata.html +376 -0
  24. data/docs/DropboxApi/Endpoints/Files/GetPreview.html +286 -0
  25. data/docs/DropboxApi/Endpoints/Files/GetTemporaryLink.html +286 -0
  26. data/docs/DropboxApi/Endpoints/Files/GetThumbnail.html +388 -0
  27. data/docs/DropboxApi/Endpoints/Files/GetThumbnailBatch.html +431 -0
  28. data/docs/DropboxApi/Endpoints/Files/ListFolder.html +383 -0
  29. data/docs/DropboxApi/Endpoints/Files/ListFolderContinue.html +298 -0
  30. data/docs/DropboxApi/Endpoints/Files/ListFolderGetLatestCursor.html +371 -0
  31. data/docs/DropboxApi/Endpoints/Files/ListFolderLongpoll.html +360 -0
  32. data/docs/DropboxApi/Endpoints/Files/ListRevisions.html +338 -0
  33. data/docs/DropboxApi/Endpoints/Files/Move.html +364 -0
  34. data/docs/DropboxApi/Endpoints/Files/PermanentlyDelete.html +337 -0
  35. data/docs/DropboxApi/Endpoints/Files/Restore.html +305 -0
  36. data/docs/DropboxApi/Endpoints/Files/SaveUrl.html +324 -0
  37. data/docs/DropboxApi/Endpoints/Files/SaveUrlCheckJobStatus.html +306 -0
  38. data/docs/DropboxApi/Endpoints/Files/Search.html +399 -0
  39. data/docs/DropboxApi/Endpoints/Files/Upload.html +439 -0
  40. data/docs/DropboxApi/Endpoints/Files/UploadSessionAppendV2.html +377 -0
  41. data/docs/DropboxApi/Endpoints/Files/UploadSessionFinish.html +328 -0
  42. data/docs/DropboxApi/Endpoints/Files/UploadSessionStart.html +350 -0
  43. data/docs/DropboxApi/Endpoints/Rpc.html +353 -0
  44. data/docs/DropboxApi/Endpoints/RpcContent.html +236 -0
  45. data/docs/DropboxApi/Endpoints/RpcNotify.html +240 -0
  46. data/docs/DropboxApi/Endpoints/Sharing.html +117 -0
  47. data/docs/DropboxApi/Endpoints/Sharing/AddFileMember.html +415 -0
  48. data/docs/DropboxApi/Endpoints/Sharing/AddFolderMember.html +400 -0
  49. data/docs/DropboxApi/Endpoints/Sharing/CreateSharedLinkWithSettings.html +322 -0
  50. data/docs/DropboxApi/Endpoints/Sharing/GetSharedLinkMetadata.html +344 -0
  51. data/docs/DropboxApi/Endpoints/Sharing/ListFileMembers.html +421 -0
  52. data/docs/DropboxApi/Endpoints/Sharing/ListFolderMembers.html +400 -0
  53. data/docs/DropboxApi/Endpoints/Sharing/ListSharedLinks.html +345 -0
  54. data/docs/DropboxApi/Endpoints/Sharing/ShareFolder.html +428 -0
  55. data/docs/DropboxApi/Endpoints/Sharing/UnshareFile.html +290 -0
  56. data/docs/DropboxApi/Endpoints/Users.html +117 -0
  57. data/docs/DropboxApi/Endpoints/Users/GetAccount.html +301 -0
  58. data/docs/DropboxApi/Endpoints/Users/GetAccountBatch.html +303 -0
  59. data/docs/DropboxApi/Endpoints/Users/GetCurrentAccount.html +282 -0
  60. data/docs/DropboxApi/Endpoints/Users/GetSpaceUsage.html +282 -0
  61. data/docs/DropboxApi/Errors.html +117 -0
  62. data/docs/DropboxApi/Errors/AddFileMemberError.html +164 -0
  63. data/docs/DropboxApi/Errors/AddFolderMemberError.html +170 -0
  64. data/docs/DropboxApi/Errors/AddMemberSelectorError.html +165 -0
  65. data/docs/DropboxApi/Errors/AlreadySharedError.html +213 -0
  66. data/docs/DropboxApi/Errors/BadPathError.html +143 -0
  67. data/docs/DropboxApi/Errors/BasicError.html +356 -0
  68. data/docs/DropboxApi/Errors/CantCopySharedFolderError.html +143 -0
  69. data/docs/DropboxApi/Errors/CantMoveFolderIntoItselfError.html +143 -0
  70. data/docs/DropboxApi/Errors/CantNestSharedFolderError.html +143 -0
  71. data/docs/DropboxApi/Errors/CantShareOutsideTeamError.html +143 -0
  72. data/docs/DropboxApi/Errors/ContainsSharedFolderError.html +143 -0
  73. data/docs/DropboxApi/Errors/ConversionError.html +143 -0
  74. data/docs/DropboxApi/Errors/CreateFileRequestError.html +160 -0
  75. data/docs/DropboxApi/Errors/CreateFolderError.html +161 -0
  76. data/docs/DropboxApi/Errors/CreateSharedLinkWithSettingsError.html +165 -0
  77. data/docs/DropboxApi/Errors/CursorClosedError.html +143 -0
  78. data/docs/DropboxApi/Errors/CursorNotClosedError.html +143 -0
  79. data/docs/DropboxApi/Errors/DeleteError.html +162 -0
  80. data/docs/DropboxApi/Errors/DisallowedNameError.html +143 -0
  81. data/docs/DropboxApi/Errors/DisallowedSharedLinkPolicyError.html +143 -0
  82. data/docs/DropboxApi/Errors/DownloadError.html +161 -0
  83. data/docs/DropboxApi/Errors/DownloadFailedError.html +143 -0
  84. data/docs/DropboxApi/Errors/EmailUnverifiedError.html +143 -0
  85. data/docs/DropboxApi/Errors/FileAncestorConflictError.html +143 -0
  86. data/docs/DropboxApi/Errors/FileConflictError.html +143 -0
  87. data/docs/DropboxApi/Errors/FileMemberActionError.html +164 -0
  88. data/docs/DropboxApi/Errors/FolderConflictError.html +143 -0
  89. data/docs/DropboxApi/Errors/GetAccountError.html +161 -0
  90. data/docs/DropboxApi/Errors/GetCopyReferenceError.html +161 -0
  91. data/docs/DropboxApi/Errors/GetMetadataError.html +161 -0
  92. data/docs/DropboxApi/Errors/GroupDeletedError.html +143 -0
  93. data/docs/DropboxApi/Errors/GroupNotOnTeamError.html +143 -0
  94. data/docs/DropboxApi/Errors/HttpError.html +124 -0
  95. data/docs/DropboxApi/Errors/InProgressError.html +143 -0
  96. data/docs/DropboxApi/Errors/InsideAppFolderError.html +143 -0
  97. data/docs/DropboxApi/Errors/InsideOsxPackageError.html +143 -0
  98. data/docs/DropboxApi/Errors/InsidePublicFolderError.html +143 -0
  99. data/docs/DropboxApi/Errors/InsideSharedFolderError.html +143 -0
  100. data/docs/DropboxApi/Errors/InsufficientPlanError.html +143 -0
  101. data/docs/DropboxApi/Errors/InsufficientSpaceError.html +143 -0
  102. data/docs/DropboxApi/Errors/InternalError.html +143 -0
  103. data/docs/DropboxApi/Errors/InvalidCommentError.html +143 -0
  104. data/docs/DropboxApi/Errors/InvalidCopyReferenceError.html +143 -0
  105. data/docs/DropboxApi/Errors/InvalidCursorError.html +143 -0
  106. data/docs/DropboxApi/Errors/InvalidDropboxIdError.html +143 -0
  107. data/docs/DropboxApi/Errors/InvalidEmailError.html +143 -0
  108. data/docs/DropboxApi/Errors/InvalidFileError.html +143 -0
  109. data/docs/DropboxApi/Errors/InvalidIdError.html +143 -0
  110. data/docs/DropboxApi/Errors/InvalidMemberError.html +143 -0
  111. data/docs/DropboxApi/Errors/InvalidPathError.html +143 -0
  112. data/docs/DropboxApi/Errors/InvalidRevisionError.html +143 -0
  113. data/docs/DropboxApi/Errors/InvalidSettingsError.html +143 -0
  114. data/docs/DropboxApi/Errors/InvalidUrlError.html +143 -0
  115. data/docs/DropboxApi/Errors/IsAppFolderError.html +143 -0
  116. data/docs/DropboxApi/Errors/IsFileError.html +143 -0
  117. data/docs/DropboxApi/Errors/IsFolderError.html +143 -0
  118. data/docs/DropboxApi/Errors/IsOsxPackageError.html +143 -0
  119. data/docs/DropboxApi/Errors/IsPublicFolderError.html +143 -0
  120. data/docs/DropboxApi/Errors/ListFolderContinueError.html +162 -0
  121. data/docs/DropboxApi/Errors/ListFolderError.html +161 -0
  122. data/docs/DropboxApi/Errors/ListFolderLongpollError.html +161 -0
  123. data/docs/DropboxApi/Errors/ListRevisionsError.html +161 -0
  124. data/docs/DropboxApi/Errors/ListSharedLinksError.html +162 -0
  125. data/docs/DropboxApi/Errors/LookupError.html +165 -0
  126. data/docs/DropboxApi/Errors/MalformedPathError.html +143 -0
  127. data/docs/DropboxApi/Errors/NoAccountError.html +143 -0
  128. data/docs/DropboxApi/Errors/NoPermissionError.html +143 -0
  129. data/docs/DropboxApi/Errors/NoWritePermissionError.html +143 -0
  130. data/docs/DropboxApi/Errors/NotAMemberError.html +143 -0
  131. data/docs/DropboxApi/Errors/NotFileError.html +143 -0
  132. data/docs/DropboxApi/Errors/NotFolderError.html +143 -0
  133. data/docs/DropboxApi/Errors/NotFoundError.html +143 -0
  134. data/docs/DropboxApi/Errors/PollError.html +162 -0
  135. data/docs/DropboxApi/Errors/PreviewError.html +164 -0
  136. data/docs/DropboxApi/Errors/RateLimitError.html +143 -0
  137. data/docs/DropboxApi/Errors/RelocationError.html +167 -0
  138. data/docs/DropboxApi/Errors/RestoreError.html +163 -0
  139. data/docs/DropboxApi/Errors/RestrictedContentError.html +143 -0
  140. data/docs/DropboxApi/Errors/SaveCopyReferenceError.html +165 -0
  141. data/docs/DropboxApi/Errors/SaveUrlError.html +164 -0
  142. data/docs/DropboxApi/Errors/SearchError.html +161 -0
  143. data/docs/DropboxApi/Errors/SettingsError.html +162 -0
  144. data/docs/DropboxApi/Errors/ShareFolderError.html +165 -0
  145. data/docs/DropboxApi/Errors/SharePathError.html +171 -0
  146. data/docs/DropboxApi/Errors/SharedFolderAccessError.html +164 -0
  147. data/docs/DropboxApi/Errors/SharedLinkAccessDeniedError.html +143 -0
  148. data/docs/DropboxApi/Errors/SharedLinkAlreadyExistsError.html +143 -0
  149. data/docs/DropboxApi/Errors/SharedLinkError.html +163 -0
  150. data/docs/DropboxApi/Errors/SharedLinkNotFoundError.html +143 -0
  151. data/docs/DropboxApi/Errors/SharingFileAccessError.html +165 -0
  152. data/docs/DropboxApi/Errors/SharingUserError.html +161 -0
  153. data/docs/DropboxApi/Errors/TeamFolderError.html +143 -0
  154. data/docs/DropboxApi/Errors/TeamPolicyDisallowsMemberPolicyError.html +143 -0
  155. data/docs/DropboxApi/Errors/ThumbnailBatchError.html +161 -0
  156. data/docs/DropboxApi/Errors/ThumbnailError.html +164 -0
  157. data/docs/DropboxApi/Errors/TooManyFilesError.html +143 -0
  158. data/docs/DropboxApi/Errors/TooManyMembersError.html +143 -0
  159. data/docs/DropboxApi/Errors/TooManyPendingInvitesError.html +143 -0
  160. data/docs/DropboxApi/Errors/TooManyRequestsError.html +321 -0
  161. data/docs/DropboxApi/Errors/TooManySharedFolderTargetsError.html +143 -0
  162. data/docs/DropboxApi/Errors/TooManyWriteOperationsError.html +167 -0
  163. data/docs/DropboxApi/Errors/UnmountedError.html +143 -0
  164. data/docs/DropboxApi/Errors/UnshareFileError.html +162 -0
  165. data/docs/DropboxApi/Errors/UnsupportedContentError.html +143 -0
  166. data/docs/DropboxApi/Errors/UnsupportedExtensionError.html +143 -0
  167. data/docs/DropboxApi/Errors/UnsupportedImageError.html +143 -0
  168. data/docs/DropboxApi/Errors/UnsupportedLinkTypeError.html +143 -0
  169. data/docs/DropboxApi/Errors/UnverifiedDropboxId.html +143 -0
  170. data/docs/DropboxApi/Errors/UploadError.html +161 -0
  171. data/docs/DropboxApi/Errors/UploadSessionFinishError.html +163 -0
  172. data/docs/DropboxApi/Errors/UploadSessionLookupError.html +164 -0
  173. data/docs/DropboxApi/Errors/UploadSessionOffsetError.html +220 -0
  174. data/docs/DropboxApi/Errors/UploadWriteFailedError.html +161 -0
  175. data/docs/DropboxApi/Errors/WriteConflictError.html +163 -0
  176. data/docs/DropboxApi/Errors/WriteError.html +165 -0
  177. data/docs/DropboxApi/Metadata.html +117 -0
  178. data/docs/DropboxApi/Metadata/AccessLevel.html +259 -0
  179. data/docs/DropboxApi/Metadata/AddFileMemberResult.html +164 -0
  180. data/docs/DropboxApi/Metadata/AddMember.html +246 -0
  181. data/docs/DropboxApi/Metadata/Base.html +545 -0
  182. data/docs/DropboxApi/Metadata/BasicAccount.html +167 -0
  183. data/docs/DropboxApi/Metadata/CommitInfo.html +232 -0
  184. data/docs/DropboxApi/Metadata/Deleted.html +158 -0
  185. data/docs/DropboxApi/Metadata/Dimensions.html +140 -0
  186. data/docs/DropboxApi/Metadata/Field.html +358 -0
  187. data/docs/DropboxApi/Metadata/File.html +238 -0
  188. data/docs/DropboxApi/Metadata/FileLinkMetadata.html +180 -0
  189. data/docs/DropboxApi/Metadata/FileMemberAction.html +230 -0
  190. data/docs/DropboxApi/Metadata/FileRequest.html +167 -0
  191. data/docs/DropboxApi/Metadata/Folder.html +228 -0
  192. data/docs/DropboxApi/Metadata/FolderLinkMetadata.html +140 -0
  193. data/docs/DropboxApi/Metadata/FolderSharingInfo.html +156 -0
  194. data/docs/DropboxApi/Metadata/LinkPermissions.html +161 -0
  195. data/docs/DropboxApi/Metadata/Location.html +140 -0
  196. data/docs/DropboxApi/Metadata/MediaInfo.html +245 -0
  197. data/docs/DropboxApi/Metadata/MediaMetadata.html +237 -0
  198. data/docs/DropboxApi/Metadata/Member.html +313 -0
  199. data/docs/DropboxApi/Metadata/MemberAction.html +274 -0
  200. data/docs/DropboxApi/Metadata/MemberActionList.html +221 -0
  201. data/docs/DropboxApi/Metadata/MemberPermission.html +163 -0
  202. data/docs/DropboxApi/Metadata/MemberPermissionList.html +237 -0
  203. data/docs/DropboxApi/Metadata/Name.html +158 -0
  204. data/docs/DropboxApi/Metadata/ParentFolderAccessInfo.html +140 -0
  205. data/docs/DropboxApi/Metadata/PhotoMetadata.html +164 -0
  206. data/docs/DropboxApi/Metadata/Resource.html +207 -0
  207. data/docs/DropboxApi/Metadata/SharedFolder.html +165 -0
  208. data/docs/DropboxApi/Metadata/SharedFolderPolicy.html +156 -0
  209. data/docs/DropboxApi/Metadata/SharedLink.html +375 -0
  210. data/docs/DropboxApi/Metadata/SharedLinkMetadata.html +204 -0
  211. data/docs/DropboxApi/Metadata/SpaceAllocation.html +156 -0
  212. data/docs/DropboxApi/Metadata/SpaceUsage.html +159 -0
  213. data/docs/DropboxApi/Metadata/Tag.html +293 -0
  214. data/docs/DropboxApi/Metadata/Team.html +140 -0
  215. data/docs/DropboxApi/Metadata/TeamMemberInfo.html +160 -0
  216. data/docs/DropboxApi/Metadata/ThumbnailBatchResultData.html +140 -0
  217. data/docs/DropboxApi/Metadata/ThumbnailBatchResultEntry.html +221 -0
  218. data/docs/DropboxApi/Metadata/UploadSessionCursor.html +226 -0
  219. data/docs/DropboxApi/Metadata/VideoMetadata.html +165 -0
  220. data/docs/DropboxApi/Metadata/WriteMode.html +439 -0
  221. data/docs/DropboxApi/MiddleWare.html +117 -0
  222. data/docs/DropboxApi/MiddleWare/DecodeResult.html +273 -0
  223. data/docs/DropboxApi/MiddleWare/Stack.html +452 -0
  224. data/docs/DropboxApi/OptionsValidator.html +234 -0
  225. data/docs/DropboxApi/ResultBuilder.html +570 -0
  226. data/docs/DropboxApi/Results.html +119 -0
  227. data/docs/DropboxApi/Results/AddFileMemberResultList.html +227 -0
  228. data/docs/DropboxApi/Results/Base.html +206 -0
  229. data/docs/DropboxApi/Results/BasicAccountBatch.html +205 -0
  230. data/docs/DropboxApi/Results/GetCopyReferenceResult.html +351 -0
  231. data/docs/DropboxApi/Results/GetTemporaryLinkResult.html +263 -0
  232. data/docs/DropboxApi/Results/GetThumbnailBatchResult.html +214 -0
  233. data/docs/DropboxApi/Results/ListFolderGetLatestCursorResult.html +210 -0
  234. data/docs/DropboxApi/Results/ListFolderLongpollResult.html +287 -0
  235. data/docs/DropboxApi/Results/ListFolderResult.html +368 -0
  236. data/docs/DropboxApi/Results/ListRevisionsResult.html +300 -0
  237. data/docs/DropboxApi/Results/ListSharedLinksResult.html +368 -0
  238. data/docs/DropboxApi/Results/SaveCopyReferenceResult.html +221 -0
  239. data/docs/DropboxApi/Results/SaveUrlJobStatus.html +230 -0
  240. data/docs/DropboxApi/Results/SaveUrlResult.html +227 -0
  241. data/docs/DropboxApi/Results/Search.html +115 -0
  242. data/docs/DropboxApi/Results/Search/Match.html +314 -0
  243. data/docs/DropboxApi/Results/SearchResult.html +368 -0
  244. data/docs/DropboxApi/Results/ShareFolderLaunch.html +205 -0
  245. data/docs/DropboxApi/Results/SharedFileMembers.html +369 -0
  246. data/docs/DropboxApi/Results/SharedFolderMembers.html +369 -0
  247. data/docs/DropboxApi/Results/UploadSessionStart.html +210 -0
  248. data/docs/DropboxApi/Results/VoidResult.html +140 -0
  249. data/docs/DropboxScaffoldBuilder.html +1117 -0
  250. data/docs/_index.html +1984 -0
  251. data/docs/class_list.html +51 -0
  252. data/docs/css/common.css +4 -0
  253. data/docs/css/full_list.css +58 -0
  254. data/docs/css/style.css +496 -0
  255. data/docs/file.README.html +257 -0
  256. data/docs/file.api_coverage.html +595 -0
  257. data/docs/file.rails_setup.html +152 -0
  258. data/docs/file_list.html +66 -0
  259. data/docs/frames.html +17 -0
  260. data/docs/index.html +257 -0
  261. data/docs/js/app.js +292 -0
  262. data/docs/js/full_list.js +216 -0
  263. data/docs/js/jquery.js +4 -0
  264. data/docs/method_list.html +1779 -0
  265. data/docs/top-level-namespace.html +112 -0
  266. data/lib/dropbox_api/chunked_uploader.rb +1 -0
  267. data/lib/dropbox_api/version.rb +1 -1
  268. metadata +264 -2
@@ -0,0 +1,152 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ File: Rails setup
8
+
9
+ &mdash; Documentation by YARD 0.9.15
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "rails_setup";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="file_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index</a> &raquo;
40
+ <span class="title">File: Rails setup</span>
41
+
42
+ </div>
43
+
44
+ <div id="search">
45
+
46
+ <a class="full_list_link" id="class_list_link"
47
+ href="class_list.html">
48
+
49
+ <svg width="24" height="24">
50
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
51
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
52
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
53
+ </svg>
54
+ </a>
55
+
56
+ </div>
57
+ <div class="clear"></div>
58
+ </div>
59
+
60
+ <div id="content"><div id='filecontents'><h1>Standard OAuth 2 flow set up</h1>
61
+
62
+ <p>This document describes how to implement the OAuth2 flow in a Rails
63
+ application, the process is represented in the following diagram:</p>
64
+
65
+ <p><img src="https://www.dropbox.com/static/images/developers/oauth2-web-diagram.png" alt="Oauth 2 flow"></p>
66
+
67
+ <p>Source: <a href="https://www.dropbox.com/developers/reference/oauth-guide#oauth-2-on-the-web">https://www.dropbox.com/developers/reference/oauth-guide#oauth-2-on-the-web</a></p>
68
+
69
+ <h2>1. Set up some new routes</h2>
70
+
71
+ <p>You&#39;ll have to create a couple of new routes:</p>
72
+
73
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>dropbox/auth</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>dropbox#auth</span><span class='tstring_end'>&#39;</span></span>
74
+ <span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>dropbox/auth_callback</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>dropbox#auth_callback</span><span class='tstring_end'>&#39;</span></span>
75
+ </code></pre>
76
+
77
+ <p>We&#39;ll use <code>dropbox/auth</code> to perform the step 2 in the diagram, i.e. this route
78
+ will redirect to Dropbox.</p>
79
+
80
+ <p>The other route, <code>dropbox/auth_callback</code>, will process the authentication token
81
+ that we&#39;ll receive from Dropbox. Steps 4 &amp; 5.</p>
82
+
83
+ <h2>2. Set up a Dropbox controller</h2>
84
+
85
+ <pre class="code ruby"><code class="ruby"><span class='kw'>class</span> <span class='const'>DropboxController</span> <span class='op'>&lt;</span> <span class='const'>ApplicationController</span>
86
+ <span class='comment'># Example call:
87
+ </span> <span class='comment'># GET /dropbox/auth
88
+ </span> <span class='kw'>def</span> <span class='id identifier rubyid_auth'>auth</span>
89
+ <span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='id identifier rubyid_authenticator'>authenticator</span><span class='period'>.</span><span class='id identifier rubyid_authorize_url'>authorize_url</span> <span class='symbol'>:redirect_uri</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_redirect_uri'>redirect_uri</span>
90
+
91
+ <span class='id identifier rubyid_redirect_to'>redirect_to</span> <span class='id identifier rubyid_url'>url</span>
92
+ <span class='kw'>end</span>
93
+
94
+ <span class='comment'># Example call:
95
+ </span> <span class='comment'># GET /dropbox/auth_callback?code=VofXAX8DO1sAAAAAAAACUKBwkDZyMg1zKT0f_FNONeA
96
+ </span> <span class='kw'>def</span> <span class='id identifier rubyid_auth_callback'>auth_callback</span>
97
+ <span class='id identifier rubyid_auth_bearer'>auth_bearer</span> <span class='op'>=</span> <span class='id identifier rubyid_authenticator'>authenticator</span><span class='period'>.</span><span class='id identifier rubyid_get_token'>get_token</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:code</span><span class='rbracket'>]</span><span class='comma'>,</span>
98
+ <span class='symbol'>:redirect_uri</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_redirect_uri'>redirect_uri</span><span class='rparen'>)</span>
99
+ <span class='id identifier rubyid_token'>token</span> <span class='op'>=</span> <span class='id identifier rubyid_auth_bearer'>auth_bearer</span><span class='period'>.</span><span class='id identifier rubyid_token'>token</span> <span class='comment'># This line is step 5 in the diagram.
100
+ </span>
101
+ <span class='comment'># At this stage you may want to persist the reusable token we&#39;ve acquired.
102
+ </span> <span class='comment'># Remember that it&#39;s bound to the Dropbox account of your user.
103
+ </span>
104
+ <span class='comment'># If you persist this token, you can use it in subsequent requests or
105
+ </span> <span class='comment'># background jobs to perform calls to Dropbox API such as the following.
106
+ </span> <span class='id identifier rubyid_folders'>folders</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="DropboxApi.html" title="DropboxApi (module)">DropboxApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="DropboxApi/Client.html" title="DropboxApi::Client (class)">Client</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="DropboxApi/Client.html#initialize-instance_method" title="DropboxApi::Client#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_list_folder'><span class='object_link'><a href="DropboxApi/Client.html#list_folder-instance_method" title="DropboxApi::Client#list_folder (method)">list_folder</a></span></span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/</span><span class='tstring_end'>&quot;</span></span>
107
+ <span class='kw'>end</span>
108
+
109
+ <span class='id identifier rubyid_private'>private</span>
110
+
111
+ <span class='kw'>def</span> <span class='id identifier rubyid_authenticator'>authenticator</span>
112
+ <span class='id identifier rubyid_client_id'>client_id</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>az8ykn83kecoodq</span><span class='tstring_end'>&quot;</span></span>
113
+ <span class='id identifier rubyid_client_secret'>client_secret</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ozp1pxo8e563fc5</span><span class='tstring_end'>&quot;</span></span>
114
+
115
+ <span class='const'><span class='object_link'><a href="DropboxApi.html" title="DropboxApi (module)">DropboxApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="DropboxApi/Authenticator.html" title="DropboxApi::Authenticator (class)">Authenticator</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="DropboxApi/Authenticator.html#initialize-instance_method" title="DropboxApi::Authenticator#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_client_id'>client_id</span><span class='comma'>,</span> <span class='id identifier rubyid_client_secret'>client_secret</span><span class='rparen'>)</span>
116
+ <span class='kw'>end</span>
117
+
118
+ <span class='kw'>def</span> <span class='id identifier rubyid_redirect_uri'>redirect_uri</span>
119
+ <span class='id identifier rubyid_dropbox_auth_callback_url'>dropbox_auth_callback_url</span> <span class='comment'># =&gt; http://localhost:3000/dropbox/auth_callback
120
+ </span> <span class='kw'>end</span>
121
+ <span class='kw'>end</span>
122
+ </code></pre>
123
+
124
+ <h2>3. Set up redirect URI in your Dropbox app settings</h2>
125
+
126
+ <p>In the previous code, you probably noticed that we&#39;re providing a <code>redirect_uri</code>
127
+ parameter. This is where the user will be redirected to after accepting our
128
+ application.</p>
129
+
130
+ <p>However, Dropbox will only redirect to a set of whitelisted URIs, so
131
+ you&#39;ll need to add yours to the list. That&#39;s very easy:</p>
132
+
133
+ <ol>
134
+ <li>Log in to your Dropbox developer account at
135
+ <a href="https://www.dropbox.com/developers">www.dropbox.com/developers</a>.</li>
136
+ <li>On the menu, click on &quot;My Apps&quot;. Then click on your application to edit its
137
+ settings.</li>
138
+ <li>On the OAuth 2 section, add the redirect URI that maps to the
139
+ <code>auth_callback</code> method that we&#39;ve implemented above. For example,
140
+ <code>www.yourapp.com/dropbox/oauth_callback</code>.</li>
141
+ </ol>
142
+ </div></div>
143
+
144
+ <div id="footer">
145
+ Generated on Mon Nov 12 20:42:55 2018 by
146
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
147
+ 0.9.15 (ruby-2.3.3).
148
+ </div>
149
+
150
+ </div>
151
+ </body>
152
+ </html>
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
+ <meta charset="utf-8" />
6
+
7
+ <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
8
+
9
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
10
+
11
+
12
+
13
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
16
+
17
+
18
+ <title>File List</title>
19
+ <base id="base_target" target="_parent" />
20
+ </head>
21
+ <body>
22
+ <div id="content">
23
+ <div class="fixed_header">
24
+ <h1 id="full_list_header">File List</h1>
25
+ <div id="full_list_nav">
26
+
27
+ <span><a target="_self" href="class_list.html">
28
+ Classes
29
+ </a></span>
30
+
31
+ <span><a target="_self" href="method_list.html">
32
+ Methods
33
+ </a></span>
34
+
35
+ <span><a target="_self" href="file_list.html">
36
+ Files
37
+ </a></span>
38
+
39
+ </div>
40
+
41
+ <div id="search">Search: <input type="text" /></div>
42
+ </div>
43
+
44
+ <ul id="full_list" class="file">
45
+
46
+
47
+ <li id="object_README" class="odd">
48
+ <div class="item"><span class="object_link"><a href="index.html" title="README">README</a></span></div>
49
+ </li>
50
+
51
+
52
+ <li id="object_api_coverage" class="even">
53
+ <div class="item"><span class="object_link"><a href="file.api_coverage.html" title="API Implementation Coverage">API Implementation Coverage</a></span></div>
54
+ </li>
55
+
56
+
57
+ <li id="object_rails_setup" class="odd">
58
+ <div class="item"><span class="object_link"><a href="file.rails_setup.html" title="Rails setup">Rails setup</a></span></div>
59
+ </li>
60
+
61
+
62
+
63
+ </ul>
64
+ </div>
65
+ </body>
66
+ </html>
@@ -0,0 +1,17 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Documentation by YARD 0.9.15</title>
6
+ </head>
7
+ <script type="text/javascript" charset="utf-8">
8
+ var match = unescape(window.location.hash).match(/^#!(.+)/);
9
+ var name = match ? match[1] : 'index.html';
10
+ name = name.replace(/^(\w+):\/\//, '').replace(/^\/\//, '');
11
+ window.top.location = name;
12
+ </script>
13
+ <noscript>
14
+ <h1>Oops!</h1>
15
+ <h2>YARD requires JavaScript!</h2>
16
+ </noscript>
17
+ </html>
@@ -0,0 +1,257 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ File: README
8
+
9
+ &mdash; Documentation by YARD 0.9.15
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "README";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index</a> &raquo;
40
+ <span class="title">File: README</span>
41
+
42
+ </div>
43
+
44
+ <div id="search">
45
+
46
+ <a class="full_list_link" id="class_list_link"
47
+ href="class_list.html">
48
+
49
+ <svg width="24" height="24">
50
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
51
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
52
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
53
+ </svg>
54
+ </a>
55
+
56
+ </div>
57
+ <div class="clear"></div>
58
+ </div>
59
+
60
+ <div id="content"><div id='filecontents'><h1>DropboxApi</h1>
61
+
62
+ <p>Library for communicating with Dropbox API v2.</p>
63
+
64
+ <h2>Installation</h2>
65
+
66
+ <p>Add this line to your application&#39;s Gemfile:</p>
67
+
68
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>dropbox_api</span><span class='tstring_end'>&#39;</span></span>
69
+ </code></pre>
70
+
71
+ <p>And then execute:</p>
72
+
73
+ <pre class="code ruby"><code class="ruby">$ bundle
74
+ </code></pre>
75
+
76
+ <p>Or install it yourself as:</p>
77
+
78
+ <pre class="code ruby"><code class="ruby">$ gem install dropbox_api
79
+ </code></pre>
80
+
81
+ <h2>Documentation</h2>
82
+
83
+ <p>Please, refer to this gem&#39;s custom <a href="http://jesus.github.io/dropbox_api">Dropbox API
84
+ documentation</a>.
85
+ Most of the time you&#39;ll be checking the <a href="http://jesus.github.io/dropbox_api/DropboxApi/Client.html">available
86
+ endpoints</a>.</p>
87
+
88
+ <p>Unfortunately, the documentation at <a href="http://www.rubydoc.info">RubyDoc.info</a> is
89
+ disrecommended because it lacks some nice features that have been added with
90
+ YARD plugins:</p>
91
+
92
+ <ul>
93
+ <li>Each endpoint includes its tests right below the description, this works as
94
+ an example of its usage.</li>
95
+ <li>All endpoints are shown as methods of the <code>Client</code> class, just as you will
96
+ use them.</li>
97
+ </ul>
98
+
99
+ <h2>Basic set up</h2>
100
+
101
+ <h3>Authorize your application</h3>
102
+
103
+ <p>Dropbox uses OAuth, in order to use this library from your application you&#39;ll
104
+ have to get an authorization code.</p>
105
+
106
+ <p>Once you have it, just pass it on client initialization:</p>
107
+
108
+ <pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="DropboxApi.html" title="DropboxApi (module)">DropboxApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="DropboxApi/Client.html" title="DropboxApi::Client (class)">Client</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="DropboxApi/Client.html#initialize-instance_method" title="DropboxApi::Client#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>VofXAX8D...</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
109
+ <span class='comment'>#=&gt; #&lt;DropboxApi::Client ...&gt;
110
+ </span></code></pre>
111
+
112
+ <p>Or set it as an ENV variable called <code>DROPBOX_OAUTH_BEARER</code>, for example:</p>
113
+
114
+ <pre class="code ruby"><code class="ruby"><span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>DROPBOX_OAUTH_BEARER</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>VofXAX8D...</span><span class='tstring_end'>&quot;</span></span>
115
+ <span class='const'><span class='object_link'><a href="DropboxApi.html" title="DropboxApi (module)">DropboxApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="DropboxApi/Client.html" title="DropboxApi::Client (class)">Client</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="DropboxApi/Client.html#initialize-instance_method" title="DropboxApi::Client#initialize (method)">new</a></span></span>
116
+ <span class='comment'>#=&gt; #&lt;DropboxApi::Client ...&gt;
117
+ </span></code></pre>
118
+
119
+ <p>Note that setting an ENV variable is only a feasible choice if you&#39;re only
120
+ using one account.</p>
121
+
122
+ <h4>Option A: Get your access token from the website</h4>
123
+
124
+ <p>The easiest way to obtain an access token is to get it from the Dropbox website.
125
+ You just need to log in to Dropbox and refer to the <em>developers</em> section, go to
126
+ <em>My apps</em> and select your application, you may need to create one if you
127
+ haven&#39;t done so yet.</p>
128
+
129
+ <p>Under your application settings, find section <em>OAuth 2</em>. You&#39;ll find a button
130
+ to generate an access token.</p>
131
+
132
+ <h4>Option B: Use <code>DropboxApi::Authenticator</code></h4>
133
+
134
+ <p>You can obtain an authorization code with this library:</p>
135
+
136
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_authenticator'>authenticator</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="DropboxApi.html" title="DropboxApi (module)">DropboxApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="DropboxApi/Authenticator.html" title="DropboxApi::Authenticator (class)">Authenticator</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="DropboxApi/Authenticator.html#initialize-instance_method" title="DropboxApi::Authenticator#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='const'>CLIENT_ID</span><span class='comma'>,</span> <span class='const'>CLIENT_SECRET</span><span class='rparen'>)</span>
137
+ <span class='id identifier rubyid_authenticator'>authenticator</span><span class='period'>.</span><span class='id identifier rubyid_authorize_url'>authorize_url</span> <span class='comment'>#=&gt; &quot;https://www.dropbox.com/...&quot;
138
+ </span>
139
+ <span class='comment'># Now you need to open the authorization URL in your browser,
140
+ </span><span class='comment'># authorize the application and copy your code.
141
+ </span>
142
+ <span class='id identifier rubyid_auth_bearer'>auth_bearer</span> <span class='op'>=</span> <span class='id identifier rubyid_authenticator'>authenticator</span><span class='period'>.</span><span class='id identifier rubyid_get_token'>get_token</span><span class='lparen'>(</span><span class='const'>CODE</span><span class='rparen'>)</span> <span class='comment'>#=&gt; #&lt;OAuth2::AccessToken ...&gt;`
143
+ </span><span class='id identifier rubyid_auth_bearer'>auth_bearer</span><span class='period'>.</span><span class='id identifier rubyid_token'>token</span> <span class='comment'>#=&gt; &quot;VofXAX8D...&quot;
144
+ </span><span class='comment'># Keep this token, you&#39;ll need it to initialize a `DropboxApi::Client` object
145
+ </span></code></pre>
146
+
147
+ <h4>Standard OAuth 2 flow</h4>
148
+
149
+ <p>This is what many web applications will use. The process is described in
150
+ Dropbox&#39;s <a href="https://www.dropbox.com/developers/reference/oauth-guide#oauth-2-on-the-web">OAuth guide</a>.</p>
151
+
152
+ <p>If you have a Rails application, you might be interested in this <a href="http://jesus.github.io/dropbox_api/file.rails_setup.html">setup
153
+ guide</a>.</p>
154
+
155
+ <h3>Performing API calls</h3>
156
+
157
+ <p>Once you&#39;ve initialized a client, for example:</p>
158
+
159
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_client'>client</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="DropboxApi.html" title="DropboxApi (module)">DropboxApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="DropboxApi/Client.html" title="DropboxApi::Client (class)">Client</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="DropboxApi/Client.html#initialize-instance_method" title="DropboxApi::Client#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>VofXAX8D...</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
160
+ <span class='comment'>#=&gt; #&lt;DropboxApi::Client ...&gt;
161
+ </span></code></pre>
162
+
163
+ <p>You can perform an API call like this:</p>
164
+
165
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_list_folder'>list_folder</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/sample_folder</span><span class='tstring_end'>&quot;</span></span>
166
+ <span class='comment'>#=&gt; #&lt;DropboxApi::Results::ListFolderResult&gt;
167
+ </span><span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_entries'>entries</span>
168
+ <span class='comment'>#=&gt; [#&lt;DropboxApi::Metadata::Folder&gt;, #&lt;DropboxApi::Metadata::File&gt;]
169
+ </span><span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_has_more?'>has_more?</span>
170
+ <span class='comment'>#=&gt; false
171
+ </span></code></pre>
172
+
173
+ <p>The instance of <code>Client</code> we&#39;ve initialized is the one you&#39;ll be using to
174
+ perform API calls. You can check the class&#39; documentation to find
175
+ <a href="http://jesus.github.io/dropbox_api/DropboxApi/Client.html">all available endpoints</a>.</p>
176
+
177
+ <h3>Large file uploads</h3>
178
+
179
+ <p>If you need to upload files larger than 150MB the default <code>#upload</code> endpoint
180
+ won&#39;t work. Instead, you need to start a upload session and upload
181
+ the file in small chunks.</p>
182
+
183
+ <p>To make this easier, the method <code>upload_by_chunks</code> will handle this for you,
184
+ example:</p>
185
+
186
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_client'>client</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="DropboxApi.html" title="DropboxApi (module)">DropboxApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="DropboxApi/Client.html" title="DropboxApi::Client (class)">Client</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="DropboxApi/Client.html#initialize-instance_method" title="DropboxApi::Client#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>VofXAX8D...</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
187
+ <span class='comment'>#=&gt; #&lt;DropboxApi::Client ...&gt;
188
+ </span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>large_file.avi</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span>
189
+ <span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_upload_by_chunks'>upload_by_chunks</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/remote_path.txt</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_f'>f</span>
190
+ <span class='kw'>end</span>
191
+ </code></pre>
192
+
193
+ <p>Check out the
194
+ <a href="http://www.xuuso.com/dropbox_api/DropboxApi/Client.html#upload_by_chunks-instance_method">method documentation</a>
195
+ to find out all available options.</p>
196
+
197
+ <h2>Dependencies</h2>
198
+
199
+ <p>This gem depends on
200
+ <a href="https://github.com/oauth-xx/oauth2">oauth2</a>
201
+ and
202
+ <a href="https://github.com/lostisland/faraday">faraday</a>.</p>
203
+
204
+ <p>It has official support for Ruby versions <code>1.9.x</code> and <code>2.x</code>.</p>
205
+
206
+ <h2>Development</h2>
207
+
208
+ <p>After checking out the repo, run <code>bin/setup</code> to install dependencies. Then, run
209
+ <code>bin/console</code> for an interactive prompt that will allow you to experiment.</p>
210
+
211
+ <h3>Testing</h3>
212
+
213
+ <p>I recommend you to use a test account other than your main one.</p>
214
+
215
+ <p>We use VCR to record the HTTP calls to Dropbox, however we sometimes need to
216
+ regenerate the cassettes. Let&#39;s take <code>list_folder</code> as an example to show what
217
+ would be the procedure to do so:</p>
218
+
219
+ <ol>
220
+ <li><p>Manually delete the existing cassettes in
221
+ <code>spec/fixtures/vcr_cassettes/list_folder/*.yml</code>.</p></li>
222
+ <li><p>Run the task to build the scaffolding in your Dropbox account so the tests
223
+ will pass. If it doesn&#39;t exist you may need to write it yourself, check
224
+ the <code>DropboxScaffoldBuilder</code> class to find all existing scaffold builders.</p>
225
+
226
+ <pre class="code text"><code class="text">DROPBOX_OAUTH_BEARER=YOUR_AUTH_BEARER rake test:build_scaffold[list_folder]
227
+ </code></pre></li>
228
+ <li><p>Run the tests and the cassettes will be written:</p>
229
+
230
+ <pre class="code text"><code class="text">DROPBOX_OAUTH_BEARER=YOUR_AUTH_BEARER rspec spec/endpoints/files/list_folder_spec.rb
231
+ </code></pre></li>
232
+ </ol>
233
+
234
+ <p>The OAuth bearer shouldn&#39;t have been recorded in the cassette and it should&#39;ve
235
+ been filtered. However, you may want to double check before pushing your
236
+ updates to Github.</p>
237
+
238
+ <p>Tip: You can simply run <code>export DROPBOX_OAUTH_BEARER=YOUR_AUTH_BEARER</code> at
239
+ the beginning of your work session so you don&#39;t need to prefix it in every
240
+ command line.</p>
241
+
242
+ <h2>Contributing</h2>
243
+
244
+ <p>Any help will be much appreciated. The easiest way to help is to implement one
245
+ or more of the <a href="http://jesus.github.io/dropbox_api/file.api_coverage.html">endpoints that are still pending</a>. To see how the
246
+ endpoints are implemented, check out the <code>lib/dropbox_api/endpoints</code> folder.</p>
247
+ </div></div>
248
+
249
+ <div id="footer">
250
+ Generated on Mon Nov 12 20:42:54 2018 by
251
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
252
+ 0.9.15 (ruby-2.3.3).
253
+ </div>
254
+
255
+ </div>
256
+ </body>
257
+ </html>