alecperkins/padhacker — Issue #7: Use Gists as backend
Author: alecperkins
Created: 2011-10-21 19:18:04+00:00
State: open
Labels: Feature

http://developer.github.com/v3/gists/
http://developer.github.com/v3/oauth/

$.ajax
url: 'https://api.github.com/gists'
data: JSON.stringify
description: 'test gist via jQuery POST'
public: false,
files:
'markup.haml':
content: '%div'
'style.sass':
content: ':body\n :color black'
'script.coffee':
content: 'x = (y) ->\n y'
'settings.json':
content: '{"has_underscore":true}'
beforeSend: (xhr) ->
xhr.setRequestHeader("Authorization", "Basic " + btoa("user:password"))
sucess: (result) ->
console.log result
type: 'POST'