Class: TentClient::PostAttachment

Inherits:
Object
  • Object
show all
Defined in:
lib/tent-client/post_attachment.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ PostAttachment

Returns a new instance of PostAttachment.



3
4
5
# File 'lib/tent-client/post_attachment.rb', line 3

def initialize(client)
  @client = client
end

Instance Method Details

#get(post_id, filename, type) ⇒ Object



7
8
9
# File 'lib/tent-client/post_attachment.rb', line 7

def get(post_id, filename, type)
  @client.http.get("posts/#{post_id}/attachments/#{filename}", {}, { 'Accept' => type })
end