Class: Cortex::ContentItems

Inherits:
Resource show all
Defined in:
lib/cortex/content_items.rb

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Cortex::Resource

Instance Method Details

#delete(id) ⇒ Object



23
24
25
# File 'lib/cortex/content_items.rb', line 23

def delete(id)
  client.delete("/content_items/#{id}")
end

#feed(params = {}) ⇒ Object



7
8
9
# File 'lib/cortex/content_items.rb', line 7

def feed(params = {})
  client.get('/content_items/feed', params)
end

#get(id) ⇒ Object



11
12
13
# File 'lib/cortex/content_items.rb', line 11

def get(id)
  client.get("/content_items/#{id}")
end

#get_published(id) ⇒ Object



15
16
17
# File 'lib/cortex/content_items.rb', line 15

def get_published(id)
  client.get("/content_items/feed/#{id}")
end

#query(params = {}) ⇒ Object



3
4
5
# File 'lib/cortex/content_items.rb', line 3

def query(params = {})
  client.get('/content_items', params)
end

#save(content_item) ⇒ Object



19
20
21
# File 'lib/cortex/content_items.rb', line 19

def save(content_item)
  client.save('/content_items', content_item)
end