Skip to content

Instantly share code, notes, and snippets.


Phil Alsford philals

Block or report user

Report or block philals

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View hello.json
"language": "Frisian",
"text": "Goeie dei"
View PHPCode.php
if ($this->config ['application_type'] == 'Partner') {
if (! file_get_contents ( $this->config ['curl_ssl_cert'] )) {
$testOutput ['ssl_cert_error'] = "Can't read the Xero Entrust cert. You need one for partner API applications. \n";
} else {
$data = openssl_x509_parse ( file_get_contents ( $this->config ['curl_ssl_cert'] ) );
$validFrom = date ( 'Y-m-d H:i:s', $data ['validFrom_time_t'] );
if (time () < $data ['validFrom_time_t']) {
$testOutput ['ssl_cert_error'] = "Xero Entrust cert not yet valid - cert valid from " . $validFrom . "\n";
$validTo = date ( 'Y-m-d H:i:s', $data ['validTo_time_t'] );
philals / node_oauth_xero
Created May 26, 2016 — forked from timborden/node_oauth_xero
Simple Node.js Xero OAuth implementation for Private, Public or Partner applications
View node_oauth_xero
"use strict";
var restify = require('restify');
var fs = require('fs');
var request = require('request');
var qs = require('qs');
var GET_request = function (req, res, next) {
var options = {
url: process.env.XERO_REQUEST_URL,
View gist:6325335e2c3e5b845e30
Accept: application/json
Authorization: OAuth oauth_consumer_key="?", oauth_token="??", oauth_signature_method="RSA-SHA1", oauth_signature="??", oauth_timestamp="?", oauth_nonce="?", oauth_version="1.0"
User-Agent: Xero Api - Integration tests
Content-Type: application/xml
Content-Length: 487
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
View gist:9317af271faae7be4989
public void find_all_accounts()
var accounts = Api.Accounts.Find();
Assert.True(accounts.Count() > 0);
View Tracking1+2 On Report
public void find_PL_report()
var reports = Api.Reports.ProfitAndLoss(DateTime.Now.AddDays(-50), null, null, Guid.Parse("351953c4-XXXX-4009-88c3-f9cd8c9cbe9f"), null, Guid.Parse("48d69e13-XXXX-47ec-a615-c1a9ff47962a"));
View Program.cs
using System;
using Xero.Api.Core;
using Xero.Api.Example.TokenStores;
using Xero.Api.Infrastructure.OAuth;
namespace Xero.Api.Example.Counts
class Program
static void Main(string[] args)
You can’t perform that action at this time.