Created
August 5, 2010 16:40
-
-
Save xenda/509989 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
# Antiguo | |
logger.info "Sending shares for project #{project.api_name}" | |
logger.info API_URL + "/shareholders/#{self.email}/shares/transferFromProject" | |
password = user.email.split("@").first | |
logger.info "amount=#{amount}&shareholderPassword=#{password}&projectName=#{URI.escape(project.api_name)}chapterName=#URI.escape(project.current_chapter.api_name)}&receivingUserName=#{receiver.email}" | |
res = Net::HTTP.post_form(URI.parse(API_URL + "/shareholders/#{self.email}/shares/transferFromProject"),'amount'=>amount,'shareholderPassword'=>password,'projectName'=>project.api_name,'chapterName'=>project.current_chapter.api_name,'receivingUserName'=>receiver.email}) | |
logger.info res | |
logger.info res.inspect | |
# Nuevo | |
API::post("/projects/#{project.api_name}", {'shareholderPassword'=>project.user.api_password,'projectName'=>project.api_name, 'chapterName'=>project.current_chapter.api_name }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment