Soumettre la recherche
Mettre en ligne
REST with Her (and let Her take care of the REST)
•
2 j'aime
•
3,241 vues
Simon Courtois
Suivre
My talk about the Her gem for Paris.rb on july 2, 2013.
Lire moins
Lire la suite
Technologie
Signaler
Partager
Signaler
Partager
1 sur 34
Recommandé
Contributing to Impala
Contributing to Impala
Cloudera, Inc.
Riminder API USER GUIDE - TALENT CLOUD SOLUTION
Riminder API USER GUIDE - TALENT CLOUD SOLUTION
Anicet Fangwa Nantcho
Lucene application
Lucene application
jagruti_bhudiya
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Atlassian
R.I. Pienaar - Puppet Camp 2010
R.I. Pienaar - Puppet Camp 2010
Puppet
My GAE apps.
My GAE apps.
Lim Chee Aun
Designing Your API
Designing Your API
Alex Payne
java.util.concurrent for Distributed Coordination, JEEConf 2019
java.util.concurrent for Distributed Coordination, JEEConf 2019
Ensar Basri Kahveci
Recommandé
Contributing to Impala
Contributing to Impala
Cloudera, Inc.
Riminder API USER GUIDE - TALENT CLOUD SOLUTION
Riminder API USER GUIDE - TALENT CLOUD SOLUTION
Anicet Fangwa Nantcho
Lucene application
Lucene application
jagruti_bhudiya
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Atlassian
R.I. Pienaar - Puppet Camp 2010
R.I. Pienaar - Puppet Camp 2010
Puppet
My GAE apps.
My GAE apps.
Lim Chee Aun
Designing Your API
Designing Your API
Alex Payne
java.util.concurrent for Distributed Coordination, JEEConf 2019
java.util.concurrent for Distributed Coordination, JEEConf 2019
Ensar Basri Kahveci
Php
Php
Ajaigururaj R
PhpSpec extension points
PhpSpec extension points
Norbert Orzechowicz
Morpheus configuration engine (slides from Saint Perl-2 conference)
Morpheus configuration engine (slides from Saint Perl-2 conference)
Vyacheslav Matyukhin
Php
Php
TSUBHASHRI
Php
Php
TSUBHASHRI
Php
Php
TSUBHASHRI
Zephir - A Wind of Change for writing PHP extensions
Zephir - A Wind of Change for writing PHP extensions
Mark Baker
Php Ppt
Php Ppt
Hema Prasanth
Php1
Php1
Reka
Php1(2)
Php1(2)
Reka
Remote File Inclusion / Local File Inclusion [Attack and Defense Techniques]
Remote File Inclusion / Local File Inclusion [Attack and Defense Techniques]
Ismail Tasdelen
My self learing -Php
My self learing -Php
laavanyaD2009
My self learn -Php
My self learn -Php
laavanyaD2009
Php
Php
Vineet Vats
Php1
Php1
poornima sugumaran
Php notes
Php notes
Muthuganesh S
Server Side Swift
Server Side Swift
Jens Ravens
Php1
Php1
poornima sugumaran
Php1
Php1
poornima sugumaran
Laravel 5 New Features
Laravel 5 New Features
Joe Ferguson
Conseils pour un lancement Product Hunt réussi
Conseils pour un lancement Product Hunt réussi
Simon Courtois
Organize your assets with Rails
Organize your assets with Rails
Simon Courtois
Contenu connexe
Similaire à REST with Her (and let Her take care of the REST)
Php
Php
Ajaigururaj R
PhpSpec extension points
PhpSpec extension points
Norbert Orzechowicz
Morpheus configuration engine (slides from Saint Perl-2 conference)
Morpheus configuration engine (slides from Saint Perl-2 conference)
Vyacheslav Matyukhin
Php
Php
TSUBHASHRI
Php
Php
TSUBHASHRI
Php
Php
TSUBHASHRI
Zephir - A Wind of Change for writing PHP extensions
Zephir - A Wind of Change for writing PHP extensions
Mark Baker
Php Ppt
Php Ppt
Hema Prasanth
Php1
Php1
Reka
Php1(2)
Php1(2)
Reka
Remote File Inclusion / Local File Inclusion [Attack and Defense Techniques]
Remote File Inclusion / Local File Inclusion [Attack and Defense Techniques]
Ismail Tasdelen
My self learing -Php
My self learing -Php
laavanyaD2009
My self learn -Php
My self learn -Php
laavanyaD2009
Php
Php
Vineet Vats
Php1
Php1
poornima sugumaran
Php notes
Php notes
Muthuganesh S
Server Side Swift
Server Side Swift
Jens Ravens
Php1
Php1
poornima sugumaran
Php1
Php1
poornima sugumaran
Laravel 5 New Features
Laravel 5 New Features
Joe Ferguson
Similaire à REST with Her (and let Her take care of the REST)
(20)
Php
Php
PhpSpec extension points
PhpSpec extension points
Morpheus configuration engine (slides from Saint Perl-2 conference)
Morpheus configuration engine (slides from Saint Perl-2 conference)
Php
Php
Php
Php
Php
Php
Zephir - A Wind of Change for writing PHP extensions
Zephir - A Wind of Change for writing PHP extensions
Php Ppt
Php Ppt
Php1
Php1
Php1(2)
Php1(2)
Remote File Inclusion / Local File Inclusion [Attack and Defense Techniques]
Remote File Inclusion / Local File Inclusion [Attack and Defense Techniques]
My self learing -Php
My self learing -Php
My self learn -Php
My self learn -Php
Php
Php
Php1
Php1
Php notes
Php notes
Server Side Swift
Server Side Swift
Php1
Php1
Php1
Php1
Laravel 5 New Features
Laravel 5 New Features
Plus de Simon Courtois
Conseils pour un lancement Product Hunt réussi
Conseils pour un lancement Product Hunt réussi
Simon Courtois
Organize your assets with Rails
Organize your assets with Rails
Simon Courtois
Speed your Rails app creation with templates
Speed your Rails app creation with templates
Simon Courtois
Dependency sorting in Ruby with TSort
Dependency sorting in Ruby with TSort
Simon Courtois
How Unidecoder Transliterates UTF-8 to ASCII
How Unidecoder Transliterates UTF-8 to ASCII
Simon Courtois
Get Slim!
Get Slim!
Simon Courtois
Multi tenant/lang application with Ruby on Rails
Multi tenant/lang application with Ruby on Rails
Simon Courtois
Fake your files - MemFs
Fake your files - MemFs
Simon Courtois
Rails is like Burger King
Rails is like Burger King
Simon Courtois
Ruby and DCI
Ruby and DCI
Simon Courtois
Cells
Cells
Simon Courtois
Mustdown
Mustdown
Simon Courtois
Vos Regexps sont fausses !
Vos Regexps sont fausses !
Simon Courtois
Ariane
Ariane
Simon Courtois
Pourquoi Ruby on Rails ça déchire ?
Pourquoi Ruby on Rails ça déchire ?
Simon Courtois
Commander
Commander
Simon Courtois
Plus de Simon Courtois
(16)
Conseils pour un lancement Product Hunt réussi
Conseils pour un lancement Product Hunt réussi
Organize your assets with Rails
Organize your assets with Rails
Speed your Rails app creation with templates
Speed your Rails app creation with templates
Dependency sorting in Ruby with TSort
Dependency sorting in Ruby with TSort
How Unidecoder Transliterates UTF-8 to ASCII
How Unidecoder Transliterates UTF-8 to ASCII
Get Slim!
Get Slim!
Multi tenant/lang application with Ruby on Rails
Multi tenant/lang application with Ruby on Rails
Fake your files - MemFs
Fake your files - MemFs
Rails is like Burger King
Rails is like Burger King
Ruby and DCI
Ruby and DCI
Cells
Cells
Mustdown
Mustdown
Vos Regexps sont fausses !
Vos Regexps sont fausses !
Ariane
Ariane
Pourquoi Ruby on Rails ça déchire ?
Pourquoi Ruby on Rails ça déchire ?
Commander
Commander
Dernier
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
soniya singh
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Delhi Call girls
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
naman860154
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Drew Madelung
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
shyamraj55
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
Pixlogix Infotech
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Igalia
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
OnBoard
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Puma Security, LLC
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
gurkirankumar98700
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
Slack Application Development 101 Slides
Slack Application Development 101 Slides
praypatel2
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Results
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
2toLead Limited
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
Paola De la Torre
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
Dernier
(20)
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Slack Application Development 101 Slides
Slack Application Development 101 Slides
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
REST with Her (and let Her take care of the REST)
1.
@happynoff AndletHertakecareoftheREST RESTwithHer bySimonCourtois
2.
@happynoff Rails+RESTAPI
3.
@happynoff ActiveResource?
4.
@happynoff RemovedinRails4
5.
@happynoff ActiveModel+Net::HTTP?
6.
@happynoff Faraday?
7.
@happynoff Her
8.
@happynoff gem‘her’
9.
@happynoff ontopofFaraday Middlewaresforfree!w00t!
10.
@happynoff # config/initializers/her.rb Her::API.setup url:
'http://api.expl.com' do |co| co.use Faraday::Request::UrlEncoded co.use Her::Middleware::DefaultParseJSON co.use Faraday::Adapter::NetHttp end
11.
@happynoff class User include Her::Model end
12.
@happynoff User.all # GET https://api.expl.com/users #
=> [#<User ...>, #<User ...>, ...]
13.
@happynoff User.find(1) # GET https://api.expl.com/users/1 #
=> #<User ...>
14.
@happynoff User.create(login: “parisrb”) # POST
https://api.expl.com/users # => #<User ...>
15.
@happynoff user = User.create(login:
“parisrb”) user.active = true user.save # POST https://api.expl.com/users # => #<User ...>
16.
@happynoff user = User.find(1) user.active
= true user.save # PUT https://api.expl.com/users/1 # => #<User ...>
17.
@happynoff user = User.find(1) user.destroy #
DELETE https://api.expl.com/users/1 # => #<User ...>
18.
@happynoff ✔BasicCRUD
19.
@happynoff User.where(moderator: 1).all # GET
/users?moderator=1 # => [#<User ...>, ...]
20.
@happynoff class User include Her::Model custom_get
:popular end User.popular # GET /users/popular # => [#<User ...>, #<User ...>]
21.
@happynoff class User include Her::Model collection_path
‘/published-users/:id’ end User.find(1) # GET /published-users/1 # => #<User ...>
22.
@happynoff ✔Customfinders
23.
@happynoff canIhazmanycomments?
24.
@happynoff class User include Her::Model has_many
:comments end class Comment include Her::Model end
25.
@happynoff user = User.find(1) #
GET /users/1 # { "id": 1, "login": "parisrb" } user.comments # GET /users/1/comments # => [#<Comment ...>, #<Comment ...>]
26.
@happynoff user = User.find(1) #
GET /users/1 # { # "id": 1, # "login": "parisrb", # “comments”: [ # { "id": 1, "text": "Foo" }, # { "id": 2, "text": "Bar" } # ] # } user.comments # => [#<Comment ...>, #<Comment ...>]
27.
@happynoff ✔associations
28.
@happynoff Middlewares!
29.
@happynoff gem‘faraday_middleware’
30.
@happynoff # config/initializers/her.rb Her::API.setup url:
'http://api.expl.com' do |co| co.use FaradayMiddleware::Caching, Memcached::Rails.new(...) # ... end
31.
@happynoff customMiddlewares
32.
@happynoff ✔awesomeness
33.
@happynoff http://her-rb.org https://github.com/remiprev/her Her Faraday https://github.com/lostisland/faraday https://github.com/lostisland/faraday_middleware
34.
@happynoff Thankyou!