Class: Streak::File

Inherits:
StreakObject show all
Defined in:
lib/streak/file.rb

Class Method Summary collapse

Methods inherited from StreakObject

attributes, construct_from, convert_to_streak_object, #initialize, #method_missing, relations

Constructor Details

This class inherits a constructor from Streak::StreakObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Streak::StreakObject

Class Method Details

.all(box_key) ⇒ Object



3
4
5
6
# File 'lib/streak/file.rb', line 3

def self.all(box_key)
  res = Streak.request(:get, "/boxes/#{box_key}/files")
  convert_to_streak_object(res, File)
end


8
9
10
11
# File 'lib/streak/file.rb', line 8

def self.get_link(file_key)
  res = Streak.request(:get, "/files/#{file_key}/link")
  convert_to_streak_object(res, File)
end