Skip to content

Instantly share code, notes, and snippets.

@alex-wilmer
Created July 7, 2015 21:18
Show Gist options
  • Save alex-wilmer/fb0d412a66e81070a3df to your computer and use it in GitHub Desktop.
Save alex-wilmer/fb0d412a66e81070a3df to your computer and use it in GitHub Desktop.
var bitcore = require('bitcore')
var request = require('request')
//console.log(new bitcore.PrivateKey())
// get address
// setInterval(getPrice, 5000)
//
// function getPrice () {
// request
// .get(
// 'https://api.quadrigacx.com/v2/ticker',
//
// function (error, response, body) {
// var price = JSON.parse(body)
//
// console.log(price)
// })
// }
var soap =
'<?xml version="1.0" encoding="utf-8"?>' +
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' +
'<soap:Body>' +
'<AddCompany xmlns="http://connectwise.com">' +
'<credentials>' +
'<CompanyId>Training</CompanyId>' +
'<IntegratorLoginId>StreamOne</IntegratorLoginId>' +
'<IntegratorPassword>Str3@m1n3</IntegratorPassword>' +
'</credentials>' +
'<company>' +
'<CompanyName>Power Rangers</CompanyName>' +
'<CompanyIdentifier>Power Rangers</CompanyIdentifier>' +
'<DefaultAddress>' +
'<City>toronto</City>' +
'<State>ontario</State>' +
'<Country>canada</Country>' +
'</DefaultAddress>' +
'</company>' +
'</AddCompany>' +
'</soap:Body>' +
'</soap:Envelope>'
var options = {
url: 'https://connect.jolera.com/v4_6_release/apis/2.0/CompanyApi.asmx',
headers: { 'content-type': 'text/xml; charset=utf-8' },
body: soap
}
request.post(options, function (error, response, body) {
console.log(error, response.statusCode, body)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment