Class: Tinycms::Posts::Api

Inherits:
BaseApi
  • Object
show all
Defined in:
lib/tinycms/posts/api.rb

Class Method Summary collapse

Methods inherited from BaseApi

client

Class Method Details

.get(post_id) ⇒ Object



8
9
10
11
12
13
# File 'lib/tinycms/posts/api.rb', line 8

def self.get(post_id)
  Retriable.retriable do
    response = client.get("/api/posts/#{post_id}")
    Tinycms::Posts::Mapper.map(response.body)
  end
end