debian-mirror-gitlab/lib/gitlab/phabricator_import/conduit/maniphest.rb
2019-09-04 21:01:54 +05:30

28 lines
654 B
Ruby

# frozen_string_literal: true
module Gitlab
module PhabricatorImport
module Conduit
class Maniphest
def initialize(phabricator_url:, api_token:)
@client = Client.new(phabricator_url, api_token)
end
def tasks(after: nil)
TasksResponse.new(get_tasks(after))
end
private
def get_tasks(after)
client.get('maniphest.search',
params: {
after: after,
attachments: { projects: 1, subscribers: 1, columns: 1 }
})
end
attr_reader :client
end
end
end
end