Permalink
Browse files

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

…that are special
  • Loading branch information...
andrewmbenton committed Aug 8, 2012
1 parent 9afcec2 commit f6cb108fe7ec15343d25080183cdf8eb9e70e6c3
Showing with 3 additions and 9 deletions.
  1. +1 −7 lib/twilio-ruby/rest/queues.rb
  2. +2 −2 lib/twilio-ruby/rest/queues/members.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={})
@@ -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

0 comments on commit f6cb108

Please sign in to comment.