Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (13 sloc) 0.382 kb
require 'rest-core'
YourClient = RestCore::Builder.client do
s = RestCore
use s::DefaultSite , 'https://api.github.com/users/'
use s::JsonDecode , true
use s::CommonLogger, method(:puts)
use s::Cache , nil, 3600
run s::RestClient
end
client = YourClient.new(:cache => {})
p client.get('cardinalblue') # cache miss
puts
p client.get('cardinalblue') # cache hit
Jump to Line
Something went wrong with that request. Please try again.