Sha256: 08055279860626536eab0c2b00c2087888c4148b2493a61bb09ab7ec1cb8c381

Contents?: true

Size: 983 Bytes

Versions: 14

Compression:

Stored size: 983 Bytes

Contents

module PivotalTracker
  class Iteration
    include HappyMapper

    class << self
      def all(project, options={})
        params = PivotalTracker.encode_options(options)
        parse(Client.connection["/projects/#{project.id}/iterations#{params}"].get)
      end
      
      def current(project)
        array = parse(Client.connection["projects/#{project.id}/iterations/current"].get)
        array.first if array
      end

      def done(project, options={})
        params = PivotalTracker.encode_options(options)
        parse(Client.connection["/projects/#{project.id}/iterations/done#{params}"].get)
      end

      def backlog(project, options={})
        params = PivotalTracker.encode_options(options)
        parse(Client.connection["/projects/#{project.id}/iterations/backlog#{params}"].get)
      end
    end

    element :id, Integer
    element :number, Integer
    element :start, DateTime
    element :finish, DateTime
    has_many :stories, Story

  end
end

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
pivotal-tracker-0.5.1 lib/pivotal-tracker/iteration.rb
pivotal-tracker-0.5.0 lib/pivotal-tracker/iteration.rb
pivotal-tracker-0.4.1 lib/pivotal-tracker/iteration.rb
pivotal-tracker-0.4.0 lib/pivotal-tracker/iteration.rb
tsenart-pivotal-tracker-0.5.0 lib/pivotal-tracker/iteration.rb
tsenart-pivotal-tracker-0.4.0 lib/pivotal-tracker/iteration.rb
topprospect-pivotal-tracker-0.1.1 lib/pivotal-tracker/iteration.rb
topprospect-pivotal-tracker-0.0.1 lib/pivotal-tracker/iteration.rb
pivotal-tracker-0.3.1 lib/pivotal-tracker/iteration.rb
pivotal-tracker-0.3.0 lib/pivotal-tracker/iteration.rb
pivotal-tracker-0.2.2 lib/pivotal-tracker/iteration.rb
pivotal-tracker-0.2.1 lib/pivotal-tracker/iteration.rb
pivotal-tracker-0.2.0 lib/pivotal-tracker/iteration.rb
pivotal-tracker-0.1.3 lib/pivotal-tracker/iteration.rb