Skip to content

Instantly share code, notes, and snippets.

View javiercbk's full-sized avatar
🥁
Drumming

Javier Lecuona javiercbk

🥁
Drumming
View GitHub Profile
var Spreadsheet = require('./spreadsheets').Spreadsheet;
const RAW = "RAW";
var spreadsheet = new Spreadsheet();
var authorizePromise = spreadsheet.authorize();
authorizePromise.then(function(){
//spreadsheetId should be replace with the actual spreadsheet id
//sheetname should be replaced with the actual sheetname
//this will read all the rows from D3 to F4
@javiercbk
javiercbk / spreadsheets.js
Last active August 31, 2016 19:05
A small class to write a spreadsheet in google
var readline = require('readline');
var Promise = require('bluebird');
var google = require('googleapis');
//requires the keys to authenticate to google apis
var creds = require('./service-account.json');
var OAuth2 = google.auth.OAuth2;
var SCOPES = ['https://www.googleapis.com/auth/drive'];
exports.Spreadsheet = class Spreadsheet {
# this is an example of the Uber API
# as a demonstration of an API spec in YAML
swagger: '2.0'
info:
title: Woodpecker API
description: Woodpecker
version: "1.0.0"
# the domain of the service
host: api.woodpecker.co
# array of all schemes that your API supports