Class: Kipalog::Post
- Inherits:
-
Object
- Object
- Kipalog::Post
- Defined in:
- lib/kipalog/post.rb
Class Method Summary collapse
- .bytag(tag_name) ⇒ Object
- .client ⇒ Object
- .create(data) ⇒ Object
- .hot ⇒ Object
- .newest ⇒ Object
- .preview(content) ⇒ Object
Class Method Details
.bytag(tag_name) ⇒ Object
24 25 26 |
# File 'lib/kipalog/post.rb', line 24 def bytag(tag_name) client.post('/post/bytag', { tag_name: tag_name }) end |
.create(data) ⇒ Object
12 13 14 |
# File 'lib/kipalog/post.rb', line 12 def create(data) client.post('/post', data) end |
.hot ⇒ Object
16 17 18 |
# File 'lib/kipalog/post.rb', line 16 def hot client.get('/post/hot') end |
.newest ⇒ Object
20 21 22 |
# File 'lib/kipalog/post.rb', line 20 def newest client.get('/post/newest') end |
.preview(content) ⇒ Object
8 9 10 |
# File 'lib/kipalog/post.rb', line 8 def preview(content) client.post('/post/preview', content: content) end |