Skip to content

Commit

Permalink
Removed versioning from protocol.
Browse files Browse the repository at this point in the history
  • Loading branch information
retospect committed Feb 15, 2011
1 parent 18b2629 commit fff9559
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/google/voice/forwarding.rb
Expand Up @@ -17,22 +17,21 @@ def set_forwarding(phoneId, enabled)
end

def phones
@curb.url = "https://www.google.com/voice/b/0/settings/tab/phones?v=499"
@curb.url = "https://www.google.com/voice/b/0/settings/tab/phones"
@curb.http_get
doc = Nokogiri::XML::Document.parse(@curb.body_str)
box = doc.xpath('/response/json').first.text
json = JSON.parse(box)
phone_list = []
json['phoneList'].each do |phoneId|
phone = json['phones']["#{phoneId}"]
json['phones'].each_pair do |phone_id, phone|
phone_list << {
:id => phoneId,
:id => phone_id,
:phoneNumber => phone['phoneNumber'],
:name => phone['name'],
:formattedNumber => phone['formattedNumber']
}
end
phone_list
return phone_list
end

end
Expand Down

0 comments on commit fff9559

Please sign in to comment.