Class: Socialmod::Item
- Inherits:
-
Base
- Object
- ActiveResource::Base
- Base
- Socialmod::Item
show all
- Defined in:
- lib/socialmod/item.rb
Defined Under Namespace
Classes: Audio, HTML, Image, Text, Video
Constant Summary
collapse
- @@element_name =
'item'
- @@collection_name =
'items'
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
api_key=, callback_url, callback_url=, #initialize
Class Method Details
.find_by_custom_id(id) ⇒ Object
15
16
17
|
# File 'lib/socialmod/item.rb', line 15
def find_by_custom_id(id)
find(:one, :from => :custom, :params => {:id => id})
end
|
.sync ⇒ Object
Also known as:
find_moderated
Find all moderated since last sync
10
11
12
|
# File 'lib/socialmod/item.rb', line 10
def sync
find(:all, :from => :sync)
end
|
Instance Method Details
#deferred? ⇒ Boolean
32
33
34
|
# File 'lib/socialmod/item.rb', line 32
def deferred?
state == 'deferred'
end
|
#destroy ⇒ Object
40
41
42
|
# File 'lib/socialmod/item.rb', line 40
def destroy
raise "You can't destroy an item"
end
|
#failed? ⇒ Boolean
28
29
30
|
# File 'lib/socialmod/item.rb', line 28
def failed?
state == 'failed'
end
|
#flag! ⇒ Object
20
21
22
|
# File 'lib/socialmod/item.rb', line 20
def flag!
post(:flag)
end
|
#passed? ⇒ Boolean
24
25
26
|
# File 'lib/socialmod/item.rb', line 24
def passed?
state == 'passed'
end
|
#pending? ⇒ Boolean
36
37
38
|
# File 'lib/socialmod/item.rb', line 36
def pending?
state == 'pending'
end
|
#update ⇒ Object
44
45
46
|
# File 'lib/socialmod/item.rb', line 44
def update
raise "You can't update an item"
end
|