File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11require 'hyperclient'
22
3+ puts "Using Hyperclient #{ Hyperclient ::VERSION } ..."
4+
35# create a new client
46api = Hyperclient . new ( 'https://grape-with-roar.herokuapp.com/api' )
57
2527# spline.to_h
2628
2729# create a new spline
28- spline = api . splines . _post ( reticulated : true )
30+ spline = api . splines . _post ( spline : { reticulated : true } )
2931puts "Created a #{ spline . reticulated ? 'reticulated' : 'unreticulated' } spline #{ spline . uuid } ."
3032
3133# update an existing spline
32- spline = api . spline ( uuid : 123 ) . _put ( reticulated : true )
34+ spline = api . spline ( uuid : 123 ) . _put ( spline : { reticulated : true } )
3335puts "Updated spline #{ spline . uuid } , now #{ spline . reticulated ? 'reticulated' : 'not reticulated' } ."
3436
3537# delete an existing spline
You can’t perform that action at this time.
0 commit comments