Module: DocumentCloud::API::CreateProject

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

Constant Summary collapse

PROJECTS_PATH =
"/projects.json"

Instance Method Summary collapse

Methods included from Utils

#build_object, #build_objects, #parse_json

Instance Method Details

#create_project(title, options = {}) ⇒ Object

Create new project

Parameters:

  • title (String)

    The document’s canonical title

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

    Customizable set of options

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

    :description A paragraph of detailed description

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

    :document_ids A list of documents that the project contains, by id

See Also:



15
16
17
# File 'lib/document_cloud/api/create_project.rb', line 15

def create_project(title, options={})
  build_object DocumentCloud::Project, post(PROJECTS_PATH, options.merge(title: title))
end