Class: Wistia::Base

Inherits:
ActiveResource::Base
  • Object
show all
Defined in:
lib/wistia/base.rb

Direct Known Subclasses

Media, Project, Projects::Sharing, Stats::Base

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.refresh_config!Object



8
9
10
11
12
# File 'lib/wistia/base.rb', line 8

def self.refresh_config!
  self.password = Wistia.password
  self.format = ActiveResource::Formats::JsonFormat if Wistia.format == :json
  self.format = ActiveResource::Formats::XmlFormat if Wistia.format == :xml
end

Instance Method Details

#to_json(options = {}) ⇒ Object



15
16
17
# File 'lib/wistia/base.rb', line 15

def to_json(options = {})
  self.attributes.to_json(options)
end