Class: Youroom::ShowAttachment

Inherits:
Request show all
Defined in:
lib/youroom_api/request/show_attachment.rb

Instance Attribute Summary collapse

Attributes inherited from Request

#access_token

Attributes inherited from Base

#host, #port, #url

Instance Method Summary collapse

Methods inherited from Request

#create_entry, #create_participation, #create_room, #create_user, #delete, #destroy_entry, #destroy_participation, #get, #get_all_timeline, #get_attachment, #get_entry, #get_my_group, #get_picture, #get_room_list, #get_room_timeline, #get_unread_timeline, #get_user_list, #get_verify_credentials, #mark_read, #mark_unread, #post

Constructor Details

#initialize(access_token, room_id, entry_id, url = BASE_URL) ⇒ ShowAttachment

Returns a new instance of ShowAttachment.


4
5
6
7
8
9
# File 'lib/youroom_api/request/show_attachment.rb', line 4

def initialize(access_token, room_id, entry_id, url=BASE_URL)
  [room_id, entry_id].each { |e| required_structure(e, String, Symbol, Fixnum) }
  @room_id = room_id
  @entry_id = entry_id
  super(access_token, url)
end

Instance Attribute Details

#entry_idObject (readonly)

Returns the value of attribute entry_id.


3
4
5
# File 'lib/youroom_api/request/show_attachment.rb', line 3

def entry_id
  @entry_id
end

#room_idObject (readonly)

Returns the value of attribute room_id.


3
4
5
# File 'lib/youroom_api/request/show_attachment.rb', line 3

def room_id
  @room_id
end

Instance Method Details

#pathObject


11
12
13
# File 'lib/youroom_api/request/show_attachment.rb', line 11

def path
  File.join(url, 'r', room_id.to_s, 'entries', entry_id.to_s, 'attachment', '?format=json')
end