Module: Pivit::Client::Project

Included in:
Pivit::Client
Defined in:
lib/pivit/client/project.rb

Overview

Project management

Instance Method Summary collapse

Instance Method Details

#create_project(options = {}) ⇒ Hashie::Mash

Create a Project

Provide the parameters you wantt to use for the project via the options hash

Examples:

Pivit::Client.create_project({:name => "Test Project", :iteration_length => "2"})

Returns:

  • (Hashie::Mash)

    project created response

See Also:

Author:

  • Jason Truluck



49
50
51
52
# File 'lib/pivit/client/project.rb', line 49

def create_project(options = {})
  options = { :project => options }
  post("projects", options).project
end

#project(project_id, options = {}) ⇒ Hashie::Mash

Retrieve a single project from your account

Examples:

Pivit::Client.project(123456)

Parameters:

  • project_id (Integer)

    the id of the project that you want to retrieve

Returns:

  • (Hashie::Mash)

    project response

See Also:

Author:

  • Jason Truluck



19
20
21
# File 'lib/pivit/client/project.rb', line 19

def project(project_id, options = {})
  get("projects/#{project_id}", options).project
end

#projects(options = {}) ⇒ Hashie::Mash

Retrieve all projects from your account

Examples:

Pivit::Client.projects

Returns:

  • (Hashie::Mash)

    projects response

See Also:

Author:

  • Jason Truluck



33
34
35
# File 'lib/pivit/client/project.rb', line 33

def projects(options = {})
  get("projects", options).projects
end