Module: Mattermost::Endpoint::Brand
- Included in:
- Mattermost::Endpoint
- Defined in:
- lib/mattermost/endpoint/brand.rb
Instance Method Summary collapse
- #get_brand_image(file_name) ⇒ Object
- #get_brand_image_url ⇒ Object
- #upload_brand_image(image_file) ⇒ Object
Instance Method Details
#get_brand_image(file_name) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/mattermost/endpoint/brand.rb', line 7 def get_brand_image(file_name) File.open(file_name, "w") do |file| file.binmode get(get_brand_image_url(), stream_body: true) do |fragment| file.write(fragment) end end end |
#get_brand_image_url ⇒ Object
16 17 18 |
# File 'lib/mattermost/endpoint/brand.rb', line 16 def get_brand_image_url "/brand/image" end |
#upload_brand_image(image_file) ⇒ Object
20 21 22 23 |
# File 'lib/mattermost/endpoint/brand.rb', line 20 def upload_brand_image(image_file) #post("/brand/image", image_file) raise NotImplementedError end |