Class: Octokitty
- Inherits:
-
Object
- Object
- Octokitty
- Defined in:
- lib/reclone/octokitty.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
! Do I need this class?.
-
#repo_call ⇒ Object
readonly
! Do I need this class?.
Instance Method Summary collapse
-
#initialize ⇒ Octokitty
constructor
A new instance of Octokitty.
- #repo_config(user) ⇒ Object
- #user_config(user_name) ⇒ Object
Constructor Details
#initialize ⇒ Octokitty
Returns a new instance of Octokitty.
5 6 7 |
# File 'lib/reclone/octokitty.rb', line 5 def initialize @client = Octokit::Client.new(access_token: ENV["GIT_PAT"], auto_traversal: true, per_page: 100) end |
Instance Attribute Details
#client ⇒ Object (readonly)
! Do I need this class?
3 4 5 |
# File 'lib/reclone/octokitty.rb', line 3 def client @client end |
#repo_call ⇒ Object (readonly)
! Do I need this class?
3 4 5 |
# File 'lib/reclone/octokitty.rb', line 3 def repo_call @repo_call end |
Instance Method Details
#repo_config(user) ⇒ Object
18 19 20 |
# File 'lib/reclone/octokitty.rb', line 18 def repo_config(user) @client.repos(user, {sort: "created", direction: "desc"}) end |
#user_config(user_name) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/reclone/octokitty.rb', line 9 def user_config(user_name) begin user = @client.user(user_name) rescue user = nil end user end |