Class: Trumpet::Channel
Class Method Summary collapse
- .all(options = {}) ⇒ Object
- .all_by_user(name, options = {}) ⇒ Object
- .create(options) ⇒ Object
- .find(name, options = {}) ⇒ Object
Instance Method Summary collapse
Class Method Details
.all(options = {}) ⇒ Object
12 13 14 |
# File 'lib/trumpet/channel.rb', line 12 def self.all(={}) Trumpet::Request.get('/channels', ).map { |attributes| Channel.new(attributes) } end |
.all_by_user(name, options = {}) ⇒ Object
16 17 18 19 |
# File 'lib/trumpet/channel.rb', line 16 def self.all_by_user(name, ={}) channels = Trumpet::Request.get("/users/#{name}/channels", ) channels.map { |attributes| Channel.new(attributes) } end |