Class: Timekit::App::Client
Overview
Client class for the app resource
Constant Summary
collapse
- API_PATH =
'/apps'
Instance Method Summary
collapse
Methods inherited from Client
#initialize
Instance Method Details
#create(name, settings = {}) ⇒ Object
13
14
15
16
17
18
19
20
21
|
# File 'lib/timekit/app/client.rb', line 13
def create(name, settings = {})
params = {
name: name
}
params[:settings] = settings if settings
post(API_PATH, params)
end
|
#delete(slug) ⇒ Object
29
30
31
|
# File 'lib/timekit/app/client.rb', line 29
def delete(slug)
super(API_PATH + '/' + slug)
end
|
#list ⇒ Object
9
10
11
|
# File 'lib/timekit/app/client.rb', line 9
def list
get(API_PATH)
end
|
#update(slug, settings) ⇒ Object
23
24
25
26
27
|
# File 'lib/timekit/app/client.rb', line 23
def update(slug, settings)
params = settings
put(API_PATH + '/' + slug, params)
end
|