class E4z::ApiClient
Public Class Methods
new(token)
click to toggle source
# File lib/eezee_api.rb, line 9 def initialize(token) @token = token end
Public Instance Methods
find_project_by_github_slug(github_slug)
click to toggle source
# File lib/eezee_api.rb, line 13 def find_project_by_github_slug(github_slug) self.class.get("/projects/find.json", options(by: 'github_full_name', value: github_slug)) end
get_instruction(project_id, instruction_id)
click to toggle source
# File lib/eezee_api.rb, line 17 def get_instruction(project_id, instruction_id) self.class.get("/projects/#{project_id}/instructions/#{instruction_id}", options) end
options(params={}, body={})
click to toggle source
# File lib/eezee_api.rb, line 25 def options(params={}, body={}) {query: {github_token: @token}.merge(params), body: body} end
update_instruction(project_id, instruction_id, body)
click to toggle source
# File lib/eezee_api.rb, line 21 def update_instruction(project_id, instruction_id, body) self.class.patch("/projects/#{project_id}/instructions/#{instruction_id}", options({}, body)) end