Permalink
Browse files

pull the api version out into a variable

  • Loading branch information...
andrewmbenton committed Jul 30, 2012
1 parent cad2d05 commit 8580bd6ce6cc73ceee912d386b50f4ba56f6394f
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/twilio-ruby/rest/client.rb
@@ -45,6 +45,8 @@ class Client
include Twilio::Util
include Twilio::REST::Utils
+ API_VERSION = '2010-04-01'
+
HTTP_HEADERS = {
'Accept' => 'application/json',
'Accept-Charset' => 'utf-8',
@@ -194,7 +196,7 @@ def set_up_ssl # :doc:
##
# Set up +account+ and +accounts+ attributes.
def set_up_subresources # :doc:
- @accounts = Twilio::REST::Accounts.new '/2010-04-01/Accounts', self
+ @accounts = Twilio::REST::Accounts.new "/#{API_VERSION}/Accounts", self
@account = @accounts.get @account_sid
end

0 comments on commit 8580bd6

Please sign in to comment.