2014.9.30  

Rails4環境でGrapeとGrape::Entityのコードサンプル  

 

Grape - ruby-grape

Grapeで簡単にAPIが作れてしまいます、というエントリーを読んで、APIを作ってリリースしたのでメモ。

What is Grape?

Grape is a REST-like API micro-framework for Ruby. It’s designed to run on Rack or complement existing web application frameworks such as Rails and Sinatra by providing a simple DSL to easily develop RESTful APIs. It has built-in support for common conventions, including multiple formats, subdomain/prefix restriction, content negotiation, versioning and much more.

プロダクトの最初の頃に作っていた超ベーシックなサンプルです。
Rails4 + grape 0.7.0 +  grape-entity 0.4.2 環境で動作確認済みです。

Github

Full Documentation

0 Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2020 Heart Beat | powered by WordPress with Barecity