Module: DocumentCloud::API::Update

Includes:
Utils
Included in:
Client
Defined in:
lib/document_cloud/api/update.rb

Constant Summary collapse

DOCUMENT_PATH =
"/documents"

Instance Method Summary collapse

Methods included from Utils

#build_object, #build_objects, #parse_json

Instance Method Details

#update(id, options = {}) ⇒ Object

Update a document

Parameters:

  • id (String)

    The document id

  • options (Hash) (defaults to: {})

    Customizable set of options

  • options (String) (defaults to: {})

    :title The document’s cannonical title

  • options (String) (defaults to: {})

    :source The source who produced the document

  • options (String) (defaults to: {})

    :description A paragraph of detailed description

  • options (String) (defaults to: {})

    :related_article The URL of the article associated with the document

  • options (String) (defaults to: {})

    :published_url The URL of the page on which the document will be embedded

  • options (String) (defaults to: {})

    :access One of ‘public’, ‘private’, ‘organization’, defaults to ‘private’

  • options (Hash) (defaults to: {})

    :data A hash of arbitrary key/value data pairs

See Also:



20
21
22
# File 'lib/document_cloud/api/update.rb', line 20

def update(id, options={})
  build_object DocumentCloud::Document, put(document_path(id), options)
end