How much REST should your web API get?
blog.restlet.com
on 05/02/2013
Excerpt: trackback There is an ongoing debate regarding the proper way to design web APIs. This is often related to the following terms:
Recently, I read “Getting hyper about hypermedia APIs“, a blog post from David H. Hansson (Rails’s creator). Looking at both the quality of his arguments and the defensiveness of the readers’ comments, he clearly hit a nerve. To understand why this is important, let’s compare the REST and Web API architecture styles in tension. REST style, as defined by Roy T. Fielding
REST was formally defined in 2000 for systems that are both distributed and driven by hypermedia interactions with humans.... read the full post.
Tags: API-Evangelist, API-Stack, Guide, How-To, REST, Story
stripe/poncho · GitHub
github.com
on 04/03/2013
Excerpt: class ChargeResource < Poncho : :Resource param :amount , :type => :integer param :currency def currency super| 'USD' end end class ChargeCreateMethod < Poncho : :JSONMethod param :amount , :type => :integer , :required => true param :currency , :in => [ 'USD' , 'GBP' ] def invoke charge = Charge. new charge. amount = param ( :amount ) charge. currency = param ( :currency ) charge. save ChargeResource. new ( charge ) end end post '/charges' , & ChargeCreateMethod
Getting started with Methods
Methods inherit from Poncho::Method
and override invoke
, where they perform any necessary logic. In a similar vein to Sinatra, anything returned from invoke
is sent right back to the user.... read the full post.
Tags: API Management, API-Evangelist, API-Stack, Frameworks, Payments, REST, Tools
Excerpt: class ChargeResource < Poncho : :Resource param :amount , :type => :integer param :currency def currency super| 'USD' end end class ChargeCreateMethod < Poncho : :JSONMethod param :amount , :type => :integer , :required => true param :currency , :in => [ 'USD' , 'GBP' ] def invoke charge = Charge. new charge. amount = param ( :amount ) charge. currency = param ( :currency ) charge. save ChargeResource. new ( charge ) end end post '/charges' , & ChargeCreateMethod Getting started with Methods Methods inherit from Poncho::Method and override invoke , where they perform any necessary logic. In a similar vein to Sinatra, anything returned from invoke is sent right back to the user.... read the full post.
Tags: API Management, API-Evangelist, API-Stack, Frameworks, Payments, REST, Tools


