Class: Vidsy::Data::API::Submission

Inherits:
Object
  • Object
show all
Defined in:
lib/vidsy/data/api/submission.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(options) ⇒ Object



8
9
10
# File 'lib/vidsy/data/api/submission.rb', line 8

def self.create(options)
  new.create options
end

.find(id) ⇒ Object



12
13
14
# File 'lib/vidsy/data/api/submission.rb', line 12

def self.find(id)
  new.find id
end

Instance Method Details

#create(options) ⇒ Object



16
17
18
# File 'lib/vidsy/data/api/submission.rb', line 16

def create(options)
  client.post(routes.submission, options).first
end

#find(id) ⇒ Object



20
21
22
# File 'lib/vidsy/data/api/submission.rb', line 20

def find(id)
  client.get("#{routes.submission}/#{id}").first
end