Created
May 23, 2013 04:00
-
-
Save adam-phillipps/5632665 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PORTAL_TOKEN = "1~R6LQJOPqzOWXQfLYDTnWXXC8rBnzlfcD9yatg004A7kQlkpEKSk8GtDGERhAJ86K" | |
PORTAL_AT_TOKEN = "1~4HqG8O8JN1f8H94IkhMYgjxD8LlEcNosQ0AJ7ET3Wh78X54fS6Be3mFHHnMiuiJs" | |
LOCAL_TOKEN = "1~KtP1voLOAsUkIgqum0qfMZl7N9PaQQhsI9vAhii0UgASIUDW40belLlk0Bhm8Mmi" | |
BETA_TOKEN = "1~gBl5tEyJ1jcCe8onAgO7rOhp8lo9fm2omVbYISciCa8BrKFJndmTqkUtNdWrJQoF" | |
PORTAL_URL = "54.243.66.130" | |
LOCAL_URL = "http://localhost:3000" | |
BETA_URL = "http://adam.beta.instructure.com" | |
RECIPIENT = "2" | |
SELECTION | |
ACCOUNT | |
def account | |
print "What account" | |
ACCOUNT = gets.to_s | |
end | |
def uniqueUsers | |
print "number of users" | |
SELECTION = gets.to_i | |
end | |
def userInput | |
SELECTION.to_i | |
end | |
def create_users (token, url, name, login) | |
postu = "curl -H 'Authorization: Bearer #{token}' \'#{url}/api/v1/accounts/" | |
def body | |
Random.new.rand(1..99999999).to_s | |
end | |
def create_conversations (token, url, recipients) | |
post = "curl -H 'Authorization: Bearer #{token}' \'#{url}/api/v1/conversations' \-F 'recipients[]=#{recipients}' \-F 'body=#{body}' \-X POST" | |
result = %x[#{post}] | |
result.to_s | |
end | |
userInput.times do |f| | |
create_conversations(PORTAL_TOKEN, PORTAL_URL, RECIPIENT) | |
puts f.to_i | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment