Class: Trakt::List
Instance Attribute Summary collapse
Attributes included from Connection
#trakt
Instance Method Summary
collapse
Methods included from Connection
#initialize, #require_settings
Instance Attribute Details
#add_info ⇒ Object
TODO options should be the various options at some point
5
6
7
|
# File 'lib/trakt/list.rb', line 5
def add_info
@add_info
end
|
#slug ⇒ Object
TODO options should be the various options at some point
5
6
7
|
# File 'lib/trakt/list.rb', line 5
def slug
@slug
end
|
Instance Method Details
#add(name, options = {}) ⇒ Object
6
7
8
9
10
11
|
# File 'lib/trakt/list.rb', line 6
def add(name,options={})
result = post 'lists/add/', options.merge(:name => name)
@slug = result['slug']
@add_info = result
return self
end
|
#add_item(data) ⇒ Object
16
17
18
|
# File 'lib/trakt/list.rb', line 16
def add_item(data)
add_items([data])
end
|
#add_items(data) ⇒ Object
19
20
21
|
# File 'lib/trakt/list.rb', line 19
def add_items(data)
post("lists/items/add/", 'slug' => slug, 'items' => data)
end
|
#delete ⇒ Object
28
29
30
|
# File 'lib/trakt/list.rb', line 28
def delete
post "lists/delete/", 'slug' => slug
end
|
#get(slug) ⇒ Object
12
13
14
15
|
# File 'lib/trakt/list.rb', line 12
def get(slug)
@slug = slug
return self
end
|
#item_delete(data) ⇒ Object
22
23
24
|
# File 'lib/trakt/list.rb', line 22
def item_delete(data)
items_delete([data])
end
|
#items_delete(data) ⇒ Object
25
26
27
|
# File 'lib/trakt/list.rb', line 25
def items_delete(data)
post("lists/items/delete/", 'slug' => slug, 'items' => data)
end
|
#update(options) ⇒ Object
31
32
33
|
# File 'lib/trakt/list.rb', line 31
def update(options)
post "lists/update/", options.merge('slug' => slug)
end
|