Class: Cortex::Posts
Instance Method Summary
collapse
Methods inherited from Resource
#initialize
Instance Method Details
#authors ⇒ Object
35
36
37
|
# File 'lib/cortex/posts.rb', line 35
def authors
client.get('/posts/feed/authors')
end
|
#delete(id) ⇒ Object
23
24
25
|
# File 'lib/cortex/posts.rb', line 23
def delete(id)
client.delete("/posts/#{id}")
end
|
#feed(params = {}) ⇒ Object
7
8
9
|
# File 'lib/cortex/posts.rb', line 7
def feed(params = {})
client.get('/posts/feed', params)
end
|
#filters ⇒ Object
27
28
29
|
# File 'lib/cortex/posts.rb', line 27
def filters
client.get('/posts/filters')
end
|
#get(id) ⇒ Object
11
12
13
|
# File 'lib/cortex/posts.rb', line 11
def get(id)
client.get("/posts/#{id}")
end
|
#get_published(id) ⇒ Object
15
16
17
|
# File 'lib/cortex/posts.rb', line 15
def get_published(id)
client.get("/posts/feed/#{id}")
end
|
#query(params = {}) ⇒ Object
3
4
5
|
# File 'lib/cortex/posts.rb', line 3
def query(params = {})
client.get('/posts', params)
end
|
31
32
33
|
# File 'lib/cortex/posts.rb', line 31
def related(id, params = {})
client.get("/posts/feed/#{id}/related", params)
end
|
#save(post) ⇒ Object
19
20
21
|
# File 'lib/cortex/posts.rb', line 19
def save(post)
client.save('/posts', post)
end
|