Skip to content

Instantly share code, notes, and snippets.

@taktamur
Created November 7, 2012 14:19
Show Gist options
  • Save taktamur/4031865 to your computer and use it in GitHub Desktop.
Save taktamur/4031865 to your computer and use it in GitHub Desktop.
gistのAPIを叩くテスト
# -*- coding: utf-8 -*-
require 'open-uri'
require 'rubygems'
require 'json'
# gistのlistを取得する
task :default do
url = ('https://api.github.com/users/taktamur/gists');
OpenURI.open_uri(url) do |f|
puts JSON.pretty_generate(JSON.parse(f.read))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment