Class: GithubAPI

Inherits:
Object
  • Object
show all
Defined in:
lib/githabit/github_api.rb

Instance Method Summary collapse

Constructor Details

#initialize(username, password) ⇒ GithubAPI

Returns a new instance of GithubAPI.



5
6
7
8
9
# File 'lib/githabit/github_api.rb', line 5

def initialize(username, password)
  @github = Github.new(
    :basic_auth => "#{username}:#{password}"
  )
end

Instance Method Details

#get_user_events(username) ⇒ Object



11
12
13
# File 'lib/githabit/github_api.rb', line 11

def get_user_events(username)
  @github.activity.events.performed(username).body
end