class Clickup::Client

Public Class Methods

new(token) click to toggle source
# File lib/clickup/client.rb, line 9
def initialize(token)
  @options = {
    headers: {
      "Authorization" => token,
      'Content-Type' => 'application/json'
    }
  }
end

Public Instance Methods

me() click to toggle source
# File lib/clickup/client.rb, line 18
def me
  response = self.class.get('/user', @options)
  response['user']
end
new_task(list_id, task) click to toggle source
# File lib/clickup/client.rb, line 23
def new_task(list_id, task)
  response = self.class.post("/list/#{list_id}/task", {
    body: task.to_json
  }.merge(@options))

  response
end