Class: Youroom::Picture
- Defined in:
- lib/youroom_api/request/get_picture.rb
Instance Attribute Summary collapse
-
#participation_id ⇒ Object
readonly
Returns the value of attribute participation_id.
-
#room_id ⇒ Object
readonly
Returns the value of attribute room_id.
Attributes inherited from Request
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(access_token, room_id, participation_id = nil, url = BASE_URL) ⇒ Picture
constructor
A new instance of Picture.
- #path ⇒ Object
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, participation_id = nil, url = BASE_URL) ⇒ Picture
Returns a new instance of Picture.
5 6 7 8 9 |
# File 'lib/youroom_api/request/get_picture.rb', line 5 def initialize(access_token, room_id, participation_id=nil, url=BASE_URL) required_structure(room_id, String, Integer) @room_id, @participation_id = room_id, participation_id super(access_token, url) end |
Instance Attribute Details
#participation_id ⇒ Object (readonly)
Returns the value of attribute participation_id.
3 4 5 |
# File 'lib/youroom_api/request/get_picture.rb', line 3 def participation_id @participation_id end |
#room_id ⇒ Object (readonly)
Returns the value of attribute room_id.
3 4 5 |
# File 'lib/youroom_api/request/get_picture.rb', line 3 def room_id @room_id end |
Instance Method Details
#path ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/youroom_api/request/get_picture.rb', line 11 def path if participation_id File.join(url, "r", room_id, "participations", participation_id, "picture.image") else File.join(url, "r", room_id, "picture.image") end end |