class IdonethisCli::Client::Entry
Attributes
error[R]
token[R]
Public Class Methods
new(token)
click to toggle source
# File lib/idonethis_cli/client/entry.rb, line 6 def initialize(token) @token = token end
Public Instance Methods
create(team_id, body)
click to toggle source
# File lib/idonethis_cli/client/entry.rb, line 10 def create(team_id, body) response = token.post(API_PATH + '/entries', params: { body: body, team_id: team_id}) JSON.parse(response.body) rescue => e @error = e.response false end
list(team_id)
click to toggle source
# File lib/idonethis_cli/client/entry.rb, line 19 def list(team_id) response = token.get(API_PATH + '/entries', { team_id: team_id }) entries = JSON.parse(response.body) rescue => e @error = e.response false end