diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-04-11 22:33:54 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-04-24 16:17:52 -0300 |
commit | fc42f3dffa364a360c76ff2785813d74f42016c7 (patch) | |
tree | 1bf7e3a340e910756ddde22bd4b8bdb1b6429048 /lib/github/user.rb | |
parent | 7030eb3286613be919e12daf95c43061b49aa5f5 (diff) | |
download | gitlab-ce-fc42f3dffa364a360c76ff2785813d74f42016c7.tar.gz |
Add basic client for the GitHub API
Diffstat (limited to 'lib/github/user.rb')
-rw-r--r-- | lib/github/user.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/github/user.rb b/lib/github/user.rb new file mode 100644 index 00000000000..19fe6230820 --- /dev/null +++ b/lib/github/user.rb @@ -0,0 +1,23 @@ +module Github + class User + attr_reader :username + + def initialize(username) + @username = username + end + + def get + client.get(user_url).body + end + + private + + def client + @client ||= Github::Client.new + end + + def user_url + "/users/#{username}" + end + end +end |