lib/groupdocs/document/annotation.rb in groupdocs-0.2 vs lib/groupdocs/document/annotation.rb in groupdocs-0.2.1
- old
+ new
@@ -109,11 +109,11 @@
@replies = replies.map do |reply|
if reply.is_a?(GroupDocs::Document::Annotation::Reply)
reply
else
reply.merge!(annotation: self)
- GroupDocs::Document::Annotation::Reply.new(reply)
+ Document::Annotation::Reply.new(reply)
end
end
end
end
@@ -142,11 +142,11 @@
# @param [Hash] access Access credentials
# @option access [String] :client_id
# @option access [String] :private_key
#
def create!(access = {})
- json = GroupDocs::Api::Request.new do |request|
+ json = Api::Request.new do |request|
request[:access] = access
request[:method] = :POST
request[:path] = "/ant/{{client_id}}/files/#{document.file.guid}/annotations"
request[:request_body] = to_hash
end.execute!
@@ -164,19 +164,19 @@
# @option access [String] :client_id
# @option access [String] :private_key
# @return [Array<GroupDocs::User>]
#
def collaborators_set!(emails, access = {})
- json = GroupDocs::Api::Request.new do |request|
+ json = Api::Request.new do |request|
request[:access] = access
request[:method] = :PUT
request[:path] = "/ant/{{client_id}}/files/#{document.file.guid}/collaborators"
request[:request_body] = emails
end.execute!
json[:collaborators].map do |collaborator|
- GroupDocs::User.new(collaborator)
+ User.new(collaborator)
end
end
# note that aliased version cannot accept access credentials hash
alias_method :collaborators=, :collaborators_set!
@@ -186,11 +186,11 @@
# @param [Hash] access Access credentials
# @option access [String] :client_id
# @option access [String] :private_key
#
def remove!(access = {})
- GroupDocs::Api::Request.new do |request|
+ Api::Request.new do |request|
request[:access] = access
request[:method] = :DELETE
request[:path] = "/ant/{{client_id}}/annotations/#{guid}"
end.execute!
end
@@ -206,10 +206,10 @@
# @return [Array<GroupDocs::Document::Annotation::Reply>]
#
# @raise [ArgumentError] If :after option is passed but it's not an instance of Time
#
def replies!(options = {}, access = {})
- GroupDocs::Document::Annotation::Reply.get!(self, options, access)
+ Document::Annotation::Reply.get!(self, options, access)
end
end # Document::Annotation
end # GroupDocs