Class: Cortex::Posts
Instance Method Summary
collapse
Methods inherited from Resource
#initialize
Instance Method Details
#delete(id) ⇒ Object
19
20
21
|
# File 'lib/cortex/posts.rb', line 19
def delete(id)
client.delete("/posts/#{id}")
end
|
#feed ⇒ Object
7
8
9
|
# File 'lib/cortex/posts.rb', line 7
def feed
client.get('/posts/feed')
end
|
#get(id) ⇒ Object
11
12
13
|
# File 'lib/cortex/posts.rb', line 11
def get(id)
client.get("/posts/#{id}")
end
|
#query ⇒ Object
3
4
5
|
# File 'lib/cortex/posts.rb', line 3
def query
client.get('/posts')
end
|
#save(post) ⇒ Object
15
16
17
|
# File 'lib/cortex/posts.rb', line 15
def save(post)
client.save('/posts', post)
end
|