require 'httparty'
uri = "https://www.rdstation.com.br/api/1.2/conversions"
token = "SEU TOKEN" # Pode ser encontrado em https://www.rdstation.com.br/docs/api
params = {
token_rdstation: token,
identificador: 'identificador-canal-entrada',
email: 'nathan.thiesen@resultadosdigitais.com.br',
nome: 'Nathan Thiesen',
empresa: 'Resultados Digitais',
cargo: 'Developer',
telefone: '123-456-789',
celular: '9999-0000',
website: 'www.resultadosdigitais.com.br',
twitter: 'NathanThiesen',
}
post = HTTParty.post(uri, { :body => params })
raise "Response not HTTP OK: #{post.response.code}" if post.response.code != "200"
Last active
August 30, 2018 20:00
-
-
Save thiesen/9512272 to your computer and use it in GitHub Desktop.
Exemplo - Integração API RD Station em Ruby
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment