Class: Cortex::Posts

Inherits:
Resource show all
Defined in:
lib/cortex/posts.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



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

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

#feedObject



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

#queryObject



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