Class: Bl::Recent

Inherits:
Thor
  • Object
show all
Includes:
Requestable
Defined in:
lib/bl/recent.rb

Instance Method Summary collapse

Methods included from Requestable

client

Constructor Details

#initializeRecent

Returns a new instance of Recent.



5
6
7
8
# File 'lib/bl/recent.rb', line 5

def initialize(*)
  @config = Bl::Config.instance
  super
end

Instance Method Details

#issues(count = nil) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/bl/recent.rb', line 11

def issues(count = nil)
  client.get(
    'users/myself/recentlyViewedIssues',
    count: count
  ).body.each do |i|
    puts [i.issue.issueKey, i.issue.summary].join("\t")
  end
end

#wikis(count = nil) ⇒ Object



21
22
23
24
25
26
27
28
# File 'lib/bl/recent.rb', line 21

def wikis(count = nil)
  client.get(
    'users/myself/recentlyViewedWikis',
    count: count
  ).body.each do |w|
    puts [w.page.id, w.page.name].join("\t")
  end
end