Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

assign the list key for members instead of queues since it's members …

…that are special
  • Loading branch information...
commit f6cb108fe7ec15343d25080183cdf8eb9e70e6c3 1 parent 9afcec2
@andrewmbenton andrewmbenton authored
View
8 lib/twilio-ruby/rest/queues.rb
@@ -1,12 +1,6 @@
module Twilio
module REST
- class Queues < ListResource
- def initialize(uri, client)
- super
- # hard-code the json key since 'members' doesn't exist in the response
- @list_key = 'queue_members'
- end
- end
+ class Queues < ListResource; end
class Queue < InstanceResource
def initialize(uri, client, params={})
View
4 lib/twilio-ruby/rest/queues/members.rb
@@ -3,8 +3,8 @@ module REST
class Members < ListResource
def initialize(uri, client)
super
- # hard-code the json key since members don't have sids
- @instance_id_key = 'call_sid'
+ # hard-code the json keys since members are special
+ @list_key, @instance_id_key = 'queue_members', 'call_sid'
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.