(no commit message)
[duncan/yastx-core.git] / examples / test.rb
1 require 'rubygems'
2 require 'network-facade'
3
4 class Digg < NetworkFacade::REST::Client 'http://services.digg.com'
5   mapping :apple_stories, '/stories/topic/apple'
6   mapping :me, '/user/pyros'
7 end
8
9 d = Digg.new
10 puts d.apple_stories(:appkey => 'http://network-facade.rubyforge.org',
11                   :count => 3, :type => :json)
12 puts d.me(:appkey => 'http://network-facade.rubyforge.org')