Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 2 files changed
  • 0 comments
  • 2 contributors

Showing 2 changed files with 12 additions and 0 deletions. Show diff stats Hide diff stats

  1. 8  crocodoc.rb
  2. 4  examples.rb
8  crocodoc.rb
@@ -78,6 +78,14 @@ def share(uuid, options = {})
78 78
     _request("/document/share", :get, options)
79 79
   end
80 80
 
  81
+  # "Clones an uploaded document. Document annotations are not copied."
  82
+  def clone(uuid, options = {})
  83
+    options.merge! :uuid => uuid
  84
+    _shake_and_stir_params(options, :uuid, :token)
  85
+    
  86
+    _request("/document/clone", :get, options)
  87
+  end
  88
+
81 89
   # "Creates a session ID for session-based document viewing. Each session ID
82 90
   #  may only be used once."
83 91
   def get_session(uuid, options = {})
4  examples.rb
@@ -32,6 +32,10 @@
32 32
 Crocodoc.share(uuid, :editable => true)
33 33
     #=> {:shortId=>"Ni2Af"}
34 34
 
  35
+# Clones an uploaded document. Document annotations are not copied.
  36
+Crocodoc.clone(uuid)
  37
+    #=> {"shortId": "Ni2Af", "uuid": "34b17ba7-5035-46d5-f69a-457abbe69cd7"}
  38
+
35 39
 # Get a new session ID for session-based document viewing
36 40
 Crocodoc.get_session(uuid)
37 41
     #=> {:sessionId=>"2FifJqejGtcR53c"}

No commit comments for this range

Something went wrong with that request. Please try again.