@@ -2335,6 +2335,73 @@ def files_move_batch_check(self,
23352335 )
23362336 return r
23372337
2338+ def files_paper_create (self ,
2339+ f ,
2340+ path ,
2341+ import_format ):
2342+ """
2343+ Creates a new Paper doc with the provided content.
2344+
2345+ :param bytes f: Contents to upload.
2346+ :param str path: The fully qualified path to the location in the user's
2347+ Dropbox where the Paper Doc should be created. This should include
2348+ the document's title and end with .paper.
2349+ :param import_format: The format of the provided data.
2350+ :type import_format: :class:`dropbox.files.ImportFormat`
2351+ :rtype: :class:`dropbox.files.PaperCreateResult`
2352+ :raises: :class:`.exceptions.ApiError`
2353+
2354+ If this raises, ApiError will contain:
2355+ :class:`dropbox.files.PaperCreateError`
2356+ """
2357+ arg = files .PaperCreateArg (path ,
2358+ import_format )
2359+ r = self .request (
2360+ files .paper_create ,
2361+ 'files' ,
2362+ arg ,
2363+ f ,
2364+ )
2365+ return r
2366+
2367+ def files_paper_update (self ,
2368+ f ,
2369+ path ,
2370+ import_format ,
2371+ doc_update_policy ,
2372+ paper_revision = None ):
2373+ """
2374+ Updates an existing Paper doc with the provided content.
2375+
2376+ :param bytes f: Contents to upload.
2377+ :param str path: Path in the user's Dropbox to update. The path must
2378+ correspond to a Paper doc or an error will be returned.
2379+ :param import_format: The format of the provided data.
2380+ :type import_format: :class:`dropbox.files.ImportFormat`
2381+ :param doc_update_policy: How the provided content should be applied to
2382+ the doc.
2383+ :type doc_update_policy: :class:`dropbox.files.PaperDocUpdatePolicy`
2384+ :param Nullable[int] paper_revision: The latest doc revision. Required
2385+ when doc_update_policy is update. This value must match the current
2386+ revision of the doc or error revision_mismatch will be returned.
2387+ :rtype: :class:`dropbox.files.PaperUpdateResult`
2388+ :raises: :class:`.exceptions.ApiError`
2389+
2390+ If this raises, ApiError will contain:
2391+ :class:`dropbox.files.PaperUpdateError`
2392+ """
2393+ arg = files .PaperUpdateArg (path ,
2394+ import_format ,
2395+ doc_update_policy ,
2396+ paper_revision )
2397+ r = self .request (
2398+ files .paper_update ,
2399+ 'files' ,
2400+ arg ,
2401+ f ,
2402+ )
2403+ return r
2404+
23382405 def files_permanently_delete (self ,
23392406 path ,
23402407 parent_rev = None ):
0 commit comments