18F / tourney

WIP: a gem to cycle through environment variables
https://github.com/18F/tourney/pull/1
Other
2 stars 2 forks source link

document Twilio use case #3

Open afeld opened 9 years ago

afeld commented 9 years ago

Since Twilio advises people to use multiple numbers when they hit the 1-SMS-per-second-per-long-code rate limit:

Scaling this concept will require multiple Twilio numbers

and that's how the idea for this project came up anyway, document use with the Twilio API as an example.

afeld commented 9 years ago

With the syntax as of 438dd15:

TWILIO_ACCOUNT_SID_0=123
TWILIO_AUTH_TOKEN_0=abc
TWILIO_ACCOUNT_SID_1=457
TWILIO_AUTH_TOKEN_1=def
twilio_creds = Tourney.fetch_group('TWILIO')
client = Twilio::REST::Client.new(
  twilio_creds['ACCOUNT_SID'],
  twilio_creds['AUTH_TOKEN']
)

@RobSpectre @rickyrobinett Would love feedback on the approach! (see #1 for background)