Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
WordPress Greek Community - 5th Crete Meetup - ...
Search
WordPress Greek Community
April 07, 2016
Programming
0
600
WordPress Greek Community - 5th Crete Meetup - Introduction to WordPress REST API - Konstantinos Kouratoras
WordPress Greek Community
April 07, 2016
Tweet
Share
More Decks by WordPress Greek Community
See All by WordPress Greek Community
Thanassis Zannias - Flexible WordPress Dev Environment with Docker
wpgr
0
6
Andreas Karavanas - AI Supercharged Landing Pages
wpgr
0
9
Όμορφα, γρήγορα και οικονομικά websites με WordPress
wpgr
0
8
Unlocking creativity - Marilia Darilli
wpgr
0
28
Έλλη Μουχτάρη - Χτίσε το προσωπικό σου brand και απόκτησε τους πελάτες που θες
wpgr
0
18
Ioannis Kastorinis - WooCommerce technical automations in the real world
wpgr
0
28
Christos Paloukas - Cache me if you can, a journey through caching layers in WordPress
wpgr
0
38
Ευάγγελος Πάλλης - Malware Cleanup & Protection
wpgr
0
38
Νίκος Μαυράκης - Κοστολογώντας τη δημιουργικότητα
wpgr
0
27
Other Decks in Programming
See All in Programming
ワンバイナリWebサービスのススメ
mackee
10
7.7k
Beyond Portability: Live Migration for Evolving WebAssembly Workloads
chikuwait
0
370
Gleamという選択肢
comamoca
6
720
Elixir で IoT 開発、 Nerves なら簡単にできる!?
pojiro
1
140
Go Modules: From Basics to Beyond / Go Modulesの基本とその先へ
kuro_kurorrr
0
120
Passkeys for Java Developers
ynojima
3
860
イベントストーミングから始めるドメイン駆動設計
jgeem
4
840
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
270
業務自動化をJavaとSeleniumとAWS Lambdaで実現した方法
greenflagproject
1
110
複数アプリケーションを育てていくための共通化戦略
irof
10
3.9k
ReadMoreTextView
fornewid
1
420
DroidKnights 2025 - 다양한 스크롤 뷰에서의 영상 재생
gaeun5744
3
260
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
92
6.1k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
Bash Introduction
62gerente
614
210k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Designing for humans not robots
tammielis
253
25k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Transcript
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
INTRODUCTION TO WORDPRESS REST API
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
Hello! Tester @ OnTheGoSystems Follow me @kouratoras
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
WORDPRESS REST API
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
WORDPRESS REST API What else? :)
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
WORDPRESS REST API Application Program Interface
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
WORDPRESS REST API REpresentational State Transfer
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
• Actions • GET, POST, PUT, DELETE • Resources • GET /posts/ • GET /posts/12 • POST /posts/ • PUT /posts/13 • DELETE /posts/14
None
None
None
None
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
WORDPRESS REST API
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
PHP API the_post(), the_content(), the_title(), etc.
None
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
PHP API
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
PHP API
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
REST PHP API
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
• Javascript • Angular, React, Ember, Backbone, Node,… • Single Page Applications • Better interfaces • Mobile integration • Third party applications
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
HISTORY
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
• JSON API plugin • Ruby on Rails front-end (2009) • WP REST API • Google Summer of Code 2013 • Basic infrastructure in WordPress 4.4 • Full merge in 4.5? 4.6? 4.7?
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
INSTALLATION
None
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
• As any other WordPress plugin • Download, install and activate • https://wordpress.org/plugins/rest-api/ • Ready!
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
EXAMPLE
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
/wp-json/posts/21433
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
/wp-json/taxonomies
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
• GET Request • 200 OK • JSON Response • No Authentication
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
• /wp-json/posts/ • /wp-json/posts/21433 • /wp-json/pages • /wp-json/taxonomies • /wp-json/comments
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
/wp-json/users
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
• Authentication • Cookies (Onsite) • Basic Authentication, Application Passwords, OAuth authentication (Offsite)
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
EXTENSIONS
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
• Custom Endpoints • Custom Responses • Custom Content Types • JavaScript/Backbone Client • v2.wp-api.org/extending/javascript-client/
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
RESOURCES v2.wp-api.org github.com/WP-API/WP-API wordpress.org/plugins/rest-api
Konstantinos Kouratoras - 5th Crete WordPress Meetup - April 2016
THANK YOU! Questions?