class GitPunch::Client
Public Class Methods
new()
click to toggle source
# File lib/git_punch/client.rb, line 7 def initialize @user = User.from_config end
Public Instance Methods
get(url)
click to toggle source
# File lib/git_punch/client.rb, line 21 def get url self.class.get url, content_type: 'application/json' end
post(url, body)
click to toggle source
# File lib/git_punch/client.rb, line 11 def post url, body request = { body: body, basic_auth: user.credentials, content_type: 'application/json' } self.class.post url, request end