Created
July 7, 2015 21:18
-
-
Save alex-wilmer/fb0d412a66e81070a3df 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
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