Class: FrameIo::Project
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- FrameIo::Project
- Defined in:
- lib/frame_io/project.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.all(team:, client:) ⇒ Object
3 4 5 |
# File 'lib/frame_io/project.rb', line 3 def self.all(team:, client:) client.get_resource("teams/#{team.id}/projects", object_class: self) end |
.find(id:, client:) ⇒ Object
7 8 9 |
# File 'lib/frame_io/project.rb', line 7 def self.find(id:, client:) client.get_resource("projects/#{id}", object_class: self) end |
Instance Method Details
#account ⇒ Object
15 16 17 |
# File 'lib/frame_io/project.rb', line 15 def account root.account end |
#assets(cache: true) ⇒ Object
19 20 21 22 23 |
# File 'lib/frame_io/project.rb', line 19 def assets(cache: true) @assets = nil unless cache @assets ||= root.children(cache:) end |
#collaborators(cache: true) ⇒ Object
25 26 27 28 29 |
# File 'lib/frame_io/project.rb', line 25 def collaborators(cache: true) @collaborators = nil unless cache @collaborators ||= Collaborator.all(project: self, client:) end |
#root ⇒ Object
11 12 13 |
# File 'lib/frame_io/project.rb', line 11 def root @root ||= Asset.find(id: root_asset.id, client:) end |