SlideShare a Scribd company logo
Copyright 2010, Intridea Inc. All Rights Reserved.	

RESTful API
On Grape
andy@intridea.com
2013/07/27 @XianOpenParty
Copyright 2010, Intridea Inc. All Rights Reserved.	

Introduction
王要弟 == Andy Wang
WangYaodi.com
Senior Ruby/Rails Enginner @intridea
Weibo/Twitter/Github/RubyChina: @yorzi
Copyright 2010, Intridea Inc. All Rights Reserved.	

What’s Grape?
Copyright 2010, Intridea Inc. All Rights Reserved.	

Generalized
Rapid
APIs
Erector
https://github.com/intridea/grape/blob/master/README.md
Copyright 2010, Intridea Inc. All Rights Reserved.	

“An opinionated
micro-framework
for creating RESTful
APIs in Ruby”
Copyright 2010, Intridea Inc. All Rights Reserved.	

REpresentational
State
Transfer	

http://www.ruanyifeng.com/blog/2011/09/restful.html
Copyright 2010, Intridea Inc. All Rights Reserved.	

Grape APIs are
Rack applications
Copyright 2010, Intridea Inc. All Rights Reserved.	

http://guides.rubyonrails.org/rails_on_rack.html
Copyright 2010, Intridea Inc. All Rights Reserved.	

Basic API
Copyright 2010, Intridea Inc. All Rights Reserved.
Copyright 2010, Intridea Inc. All Rights Reserved.	

Add Prefix
Copyright 2010, Intridea Inc. All Rights Reserved.	

Add Namespace
Copyright 2010, Intridea Inc. All Rights Reserved.	

Add Version
Copyright 2010, Intridea Inc. All Rights Reserved.	

Authentication
Copyright 2010, Intridea Inc. All Rights Reserved.	

Use Helpers
Copyright 2010, Intridea Inc. All Rights Reserved.	

Raise Error
Copyright 2010, Intridea Inc. All Rights Reserved.	

Exception Handling
Copyright 2010, Intridea Inc. All Rights Reserved.	

JSONP & CORS
Copyright 2010, Intridea Inc. All Rights Reserved.	

Rabl Template
Copyright 2010, Intridea Inc. All Rights Reserved.	

Cookies
Copyright 2010, Intridea Inc. All Rights Reserved.	

Redirecting
Copyright 2010, Intridea Inc. All Rights Reserved.	

Logging
Copyright 2010, Intridea Inc. All Rights Reserved.	

https://github.com/intridea/grape/blob/master/README.md	

More Features
Copyright 2010, Intridea Inc. All Rights Reserved.	

Run Rack App
Copyright 2010, Intridea Inc. All Rights Reserved.	

Work with Rails
Copyright 2010, Intridea Inc. All Rights Reserved.	

Resources
https://github.com/intridea/grape/wiki
Copyright 2010, Intridea Inc. All Rights Reserved.	

Question?
Copyright 2010, Intridea Inc. All Rights Reserved.	

Thank You!

More Related Content

Similar to Restful API On Grape

Build Blog As a Professional
Build Blog As a ProfessionalBuild Blog As a Professional
Build Blog As a ProfessionalAndy Wang
 
Riding on rails3 with full stack of gems
Riding on rails3 with full stack of gemsRiding on rails3 with full stack of gems
Riding on rails3 with full stack of gems
Andy Wang
 
Android Development: Approach for Agile Teams
Android Development: Approach for Agile TeamsAndroid Development: Approach for Agile Teams
Android Development: Approach for Agile Teams
Anay Kamat
 
At&T Interactive: The Many Facets Of Ruby
At&T Interactive: The Many Facets Of RubyAt&T Interactive: The Many Facets Of Ruby
At&T Interactive: The Many Facets Of Ruby
Coby Randquist
 
Designing an API
Designing an APIDesigning an API
Designing an API
Twobo Technologies
 
Ror Seminar With agilebd.org on 23 Jan09
Ror Seminar With agilebd.org on 23 Jan09Ror Seminar With agilebd.org on 23 Jan09
Ror Seminar With agilebd.org on 23 Jan09
Shaer Hassan
 
Ionic adventures - Hybrid Mobile App Development rocks
Ionic adventures - Hybrid Mobile App Development rocksIonic adventures - Hybrid Mobile App Development rocks
Ionic adventures - Hybrid Mobile App Development rocks
Juarez Filho
 
Hybrid mobile apps
Hybrid mobile appsHybrid mobile apps
Hybrid mobile apps
Abraham Barrera
 
How to Plan Web Development Career the Right way?
How to Plan Web Development Career the Right way?How to Plan Web Development Career the Right way?
How to Plan Web Development Career the Right way?
Intellipaat
 
REST API Doc Best Practices
REST API Doc Best PracticesREST API Doc Best Practices
REST API Doc Best Practices
Marta Rauch
 
SoundCloud API Do:s and Don't:s
SoundCloud API Do:s and Don't:sSoundCloud API Do:s and Don't:s
SoundCloud API Do:s and Don't:s
Eric Wahlforss
 
Cross platform mobile apps using rhomobile and jquery mobile
Cross platform mobile apps using rhomobile and jquery mobileCross platform mobile apps using rhomobile and jquery mobile
Cross platform mobile apps using rhomobile and jquery mobile
SPRITLE SOFTWARE PRIVATE LIMIT ED
 
Microservices with Swagger, Flask and Docker
Microservices with Swagger, Flask and DockerMicroservices with Swagger, Flask and Docker
Microservices with Swagger, Flask and Docker
Dhilipsiva DS
 
Ruby Kaigi09 China Rubyupdate20090718
Ruby Kaigi09 China Rubyupdate20090718Ruby Kaigi09 China Rubyupdate20090718
Ruby Kaigi09 China Rubyupdate20090718tengu
 
Api Lifecycle Operation with Open Source Products
Api Lifecycle Operation with Open Source ProductsApi Lifecycle Operation with Open Source Products
Api Lifecycle Operation with Open Source Products
DevOps Indonesia
 
Node.js as an IOT Bridge
Node.js as an IOT BridgeNode.js as an IOT Bridge
Node.js as an IOT Bridge
Eduardo Pelegri-Llopart
 
Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016
Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016
Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016
Prateek Jain
 
Application Architecture: The Next Wave | MuleSoft
Application Architecture: The Next Wave | MuleSoftApplication Architecture: The Next Wave | MuleSoft
Application Architecture: The Next Wave | MuleSoft
Bui Kiet
 
OSS Tools: Creating a Reverse Engineering Plug-in for r2frida
OSS Tools: Creating a Reverse Engineering Plug-in for r2fridaOSS Tools: Creating a Reverse Engineering Plug-in for r2frida
OSS Tools: Creating a Reverse Engineering Plug-in for r2frida
NowSecure
 
Social networking api for Android Developers
Social networking api for Android DevelopersSocial networking api for Android Developers
Social networking api for Android Developers
Satyam Twanabasu
 

Similar to Restful API On Grape (20)

Build Blog As a Professional
Build Blog As a ProfessionalBuild Blog As a Professional
Build Blog As a Professional
 
Riding on rails3 with full stack of gems
Riding on rails3 with full stack of gemsRiding on rails3 with full stack of gems
Riding on rails3 with full stack of gems
 
Android Development: Approach for Agile Teams
Android Development: Approach for Agile TeamsAndroid Development: Approach for Agile Teams
Android Development: Approach for Agile Teams
 
At&T Interactive: The Many Facets Of Ruby
At&T Interactive: The Many Facets Of RubyAt&T Interactive: The Many Facets Of Ruby
At&T Interactive: The Many Facets Of Ruby
 
Designing an API
Designing an APIDesigning an API
Designing an API
 
Ror Seminar With agilebd.org on 23 Jan09
Ror Seminar With agilebd.org on 23 Jan09Ror Seminar With agilebd.org on 23 Jan09
Ror Seminar With agilebd.org on 23 Jan09
 
Ionic adventures - Hybrid Mobile App Development rocks
Ionic adventures - Hybrid Mobile App Development rocksIonic adventures - Hybrid Mobile App Development rocks
Ionic adventures - Hybrid Mobile App Development rocks
 
Hybrid mobile apps
Hybrid mobile appsHybrid mobile apps
Hybrid mobile apps
 
How to Plan Web Development Career the Right way?
How to Plan Web Development Career the Right way?How to Plan Web Development Career the Right way?
How to Plan Web Development Career the Right way?
 
REST API Doc Best Practices
REST API Doc Best PracticesREST API Doc Best Practices
REST API Doc Best Practices
 
SoundCloud API Do:s and Don't:s
SoundCloud API Do:s and Don't:sSoundCloud API Do:s and Don't:s
SoundCloud API Do:s and Don't:s
 
Cross platform mobile apps using rhomobile and jquery mobile
Cross platform mobile apps using rhomobile and jquery mobileCross platform mobile apps using rhomobile and jquery mobile
Cross platform mobile apps using rhomobile and jquery mobile
 
Microservices with Swagger, Flask and Docker
Microservices with Swagger, Flask and DockerMicroservices with Swagger, Flask and Docker
Microservices with Swagger, Flask and Docker
 
Ruby Kaigi09 China Rubyupdate20090718
Ruby Kaigi09 China Rubyupdate20090718Ruby Kaigi09 China Rubyupdate20090718
Ruby Kaigi09 China Rubyupdate20090718
 
Api Lifecycle Operation with Open Source Products
Api Lifecycle Operation with Open Source ProductsApi Lifecycle Operation with Open Source Products
Api Lifecycle Operation with Open Source Products
 
Node.js as an IOT Bridge
Node.js as an IOT BridgeNode.js as an IOT Bridge
Node.js as an IOT Bridge
 
Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016
Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016
Build Mobile Applications with Headless Drupal 8 - DrupalConAsia 2016
 
Application Architecture: The Next Wave | MuleSoft
Application Architecture: The Next Wave | MuleSoftApplication Architecture: The Next Wave | MuleSoft
Application Architecture: The Next Wave | MuleSoft
 
OSS Tools: Creating a Reverse Engineering Plug-in for r2frida
OSS Tools: Creating a Reverse Engineering Plug-in for r2fridaOSS Tools: Creating a Reverse Engineering Plug-in for r2frida
OSS Tools: Creating a Reverse Engineering Plug-in for r2frida
 
Social networking api for Android Developers
Social networking api for Android DevelopersSocial networking api for Android Developers
Social networking api for Android Developers
 

More from Andy Wang

构建微信公众平台应用
构建微信公众平台应用构建微信公众平台应用
构建微信公众平台应用
Andy Wang
 
WeChat Platform Introduction
WeChat Platform IntroductionWeChat Platform Introduction
WeChat Platform Introduction
Andy Wang
 
HTML5 Storage/Cache
HTML5 Storage/CacheHTML5 Storage/Cache
HTML5 Storage/Cache
Andy Wang
 
远程工作那些事儿
远程工作那些事儿远程工作那些事儿
远程工作那些事儿
Andy Wang
 
The Mina Way
The Mina WayThe Mina Way
The Mina Way
Andy Wang
 
Map Basics For Noob
Map Basics For NoobMap Basics For Noob
Map Basics For Noob
Andy Wang
 
Join In OpenSource
Join In OpenSourceJoin In OpenSource
Join In OpenSource
Andy Wang
 
Git Workflow Practice
Git Workflow PracticeGit Workflow Practice
Git Workflow Practice
Andy Wang
 

More from Andy Wang (8)

构建微信公众平台应用
构建微信公众平台应用构建微信公众平台应用
构建微信公众平台应用
 
WeChat Platform Introduction
WeChat Platform IntroductionWeChat Platform Introduction
WeChat Platform Introduction
 
HTML5 Storage/Cache
HTML5 Storage/CacheHTML5 Storage/Cache
HTML5 Storage/Cache
 
远程工作那些事儿
远程工作那些事儿远程工作那些事儿
远程工作那些事儿
 
The Mina Way
The Mina WayThe Mina Way
The Mina Way
 
Map Basics For Noob
Map Basics For NoobMap Basics For Noob
Map Basics For Noob
 
Join In OpenSource
Join In OpenSourceJoin In OpenSource
Join In OpenSource
 
Git Workflow Practice
Git Workflow PracticeGit Workflow Practice
Git Workflow Practice
 

Recently uploaded

Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 

Recently uploaded (20)

Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 

Restful API On Grape