ruby/box_api.rb
def create_folder_with_files(folder_name, recipient, sender) 
	puts "Creating folder with files."
	data = {
		"name" => folder_name,
		"from" => sender,
		"to" => recipient,
		"files" => [{
			"name" => "Ruby_File1.pdf",
			"copies" => 1,
			"notes" => "Ruby_File1 was uploaded using Ruby",
			"url" => "file_url1"
		}, {
			"name" => "Ruby_File2.pdf",
			"copies" => 1,
			"notes" => "Ruby_File2 was uploaded using Ruby",
			"url" => "file_url2"
		}]
	}.to_json()
	puts data
	response = request_post('/api/partner/folder', data)
	puts response.body
end
# Creates a folder with the given folder and recipient/sender information and
# uploads the specified files into the newly created folder
#
# Params:
#   folder_name - Folder name
#   recipient - Name of recipient
#   sender - sender of the folder
Creates a folder with the given folder and recipient/sender information and
uploads the specified files into the newly created folder

Folder name
recipient - Name of recipient
sender - sender of the folder
Creates a folder with the given folder and recipient / sender information and uploads the specified files into the newly created folder Folder name recipient - Name of recipient sender - sender of the folder
def create_folder_with_files(folder_name, recipient, sender) 
	puts "Creating folder with files."
	data = {
		"name" => folder_name,
		"from" => sender,
		"to" => recipient,
		"files" => [{
			"name" => "Ruby_File1.pdf",
			"copies" => 1,
			"notes" => "Ruby_File1 was uploaded using Ruby",
			"url" => "file_url1"
		}, {
			"name" => "Ruby_File2.pdf",
			"copies" => 1,
			"notes" => "Ruby_File2 was uploaded using Ruby",
			"url" => "file_url2"
		}]
	}.to_json()
	puts data
	response = request_post('/api/partner/folder', data)
	puts response.body
end
def create_folder_with_files ( folder_name , recipient , sender ) puts "Creating folder with files." data = { "name" => folder_name , "from" => sender , "to" => recipient , "files" => [ { "name" => "Ruby_File1.pdf" , "copies" => 1 , "notes" => "Ruby_File1 was uploaded using Ruby" , "url" => "file_url1" } , { "name" => "Ruby_File2.pdf" , "copies" => 1 , "notes" => "Ruby_File2 was uploaded using Ruby" , "url" => "file_url2" } ] } . to_json ( ) puts data response = request_post ( '/api/partner/folder' , data ) puts response . body end
Creates a folder with the given folder and recipient/sender information and
uploads the specified files into the newly created folder
Creates a folder with the given folder and recipient / sender information and uploads the specified files into the newly created folder
folder_name
recipient
sender