also / lead.js

lead.github.io
MIT License
29 stars 8 forks source link

list gists #74

Open also opened 10 years ago

also commented 10 years ago
username = 'also'

gh = require 'github'
site = settings.get 'github', 'githubs', gh.default()
request = http.get gh.to_api_url site, "/users/#{username}/gists"
request.then (data) ->
  notebooks = _.filter data, (gist) -> gist.files['notebook.lnb']?
  _.each notebooks, (nb) ->
    comment = if nb.description? then " # #{nb.description}" else ''
    example "gist #{nb.id}#{comment}"