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