Sha256: eba33489ee3e72d09e4f31cf81da487a8395cd7792ed96d8391cc31c6ca76557

Contents?: true

Size: 505 Bytes

Versions: 6

Compression:

Stored size: 505 Bytes

Contents

class YouTrack::Client::Issues < YouTrack::Client::Collection

  attribute :project_id

  model YouTrack::Client::Issue

  def all(project, filters={})
    project_id = (project.respond_to?(:identity) ? project.identity : project)

    response = service.get_issues(project_id, filters)
    merge_attributes(project_id: project_id)
    load(response.body)
  end

  def get(identity)
    service.issues.new(
      service.get_issue(identity).body
    )
  rescue Faraday::ResourceNotFound
    nil
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
you_track-0.4.8 lib/you_track/client/models/issues.rb
you_track-0.4.7 lib/you_track/client/models/issues.rb
you_track-0.4.6 lib/you_track/client/models/issues.rb
you_track-0.4.5 lib/you_track/client/models/issues.rb
you_track-0.4.4 lib/you_track/client/models/issues.rb
you_track-0.4.2 lib/you_track/client/models/issues.rb