SlideShare una empresa de Scribd logo
1 de 23
Descargar para leer sin conexión
Introduction to the Pods 
JSON API 
Josh Pollock, @josh412 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
What Is The WordPress REST API? 
A really easy way to move data between sites or inside of a 
site using the standardized JSON format. 
Currently a plugin, Hopefully WordPress 4.1 
http://wp-api.org 
https://speakerdeck.com/rmccue/wcmke2014 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
Helpful Functions 
json_url() 
● REST API Root URL 
● REST API 
add_query_arg() 
● Add arguments to URLs 
● WordPress 
json_encode() 
● Convert PHP to JSON 
● PHP 
json_decode() 
● Convert JSON to PHP 
● PHP 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
The Pods JSON API 
Extends the WordPress REST API 
Routes for: 
● Pods 
● Pods API 
● Pods Components 
https://github.com/pods-framework/pods-json-api 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
Authentication Options 
● Basic Authentication 
● Nonce/Cookie 
● Key pairs 
● oAuth1 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
Access Filters In Pods JSON API 
Endpoints in Pods 
apply_filters( 'pods_json_api_access_pods_' . $method, $access, $method, $pod, $item ); 
apply_filters( 'pods_json_api_access_pods', $access, $method, $pod, $item ); 
Endpoints in Pods API 
apply_filters( 'pods_json_api_access_api_' . $method, $access, $method ); 
apply_filters( 'pods_json_api_access_api', $access, $method ); 
Endpoints in Components 
apply_filters( 'pods_json_api_access_components_' . $method, $access, $method ); 
apply_filters( 'pods_json_api_access_components', $access, $method ); 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
GET vs POST 
RESTful APIs use the basic HTTP methods: 
GET POST PUT DELETE 
We will be using GET to get items and POST to create items. 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
Capabilities of The Pods JSON API 
○ Show Pods and content 
○ Save Pods 
○ Create Pods and Fields 
○ Import a Pods Package 
○ Activate/ deactivate components 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
The WordPress HTTP API 
A simple PHP API in WordPress for making HTTP requests. 
Helpful functions such as: 
wp_remote_get() 
http://codex.wordpress.org/Function_Reference/wp_remote_get 
wp_remote_retrieve_body() 
http://codex.wordpress.org/Function_API/wp_remote_retrieve_body 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
Getting Pods Items 
Make a GET request to 
<json-url>/pods/<pod> 
or 
<json-url>/pods/<pod>/<id> 
$headers = array ( 
'Authorization' => 'Basic ' . base64_encode( 'username' 
. ':' . 'password' ), 
); 
$url = json_url( 'pods/jedi' ); 
$response = wp_remote_post( $url, array ( 
'method' => 'GET', 
'headers' => $headers, 
) 
); 
//make sure response isn't an error 
if ( ! is_wp_error( $response ) ) { 
//show the updated post item 
var_dump( wp_remote_retrieve_body( $response ) ); 
} 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
Using Pods Find 
Add the parameters to the URL, 
using add_query_arg() 
$headers = array ( 
'Authorization' => 'Basic ' . base64_encode( 'username' . ':' 
. 'password' ), 
); 
$url = json_url( 'pods/jedi' ); 
$params = array( 
'home_world.post_title' => 'Tatooine' 
); 
$url = add_query_arg( $params, $url ); 
$response = wp_remote_post( $url, array ( 
'method' => 'GET', 
'headers' => $headers, 
) 
); 
//make sure response isn't an error 
if ( ! is_wp_error( $response ) ) { 
//show the updated post item 
var_dump( wp_remote_retrieve_body( $response ) ); 
} 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
Saving Pods Items 
Make POST request to 
New item: 
<json-url>/<pod> 
Update item: 
<json-url>/<pod>/<id> 
$data = array( 'home_planet' => 'Alderann' ); 
$url = json_url( 'pods/jedi/9' ); 
$headers = array ( 
'Authorization' => 'Basic ' . base64_encode( 'username' . ':' . 
'password' ), 
); 
$response = wp_remote_post( $url, array ( 
'method' => 'POST', 
'headers' => $headers, 
'body' => json_encode( $data ) 
) 
); 
//make sure response isn't an error 
if ( ! is_wp_error( $response ) ) { 
//show the updated post item 
var_dump( wp_remote_retrieve_body( $response ) ); 
} 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
Creating Pods 
POST to <json-url>/<pods-api> 
Body of request passed to 
PodsAPI->save_pod() 
$data = array( 
'name' => 'jedi', 
'type' => 'post_type', 
); 
$url = json_url( 'pods-api' ); 
$headers = array ( 
'Authorization' => 'Basic ' . base64_encode( 'username' . ':' . 
'password' ), 
); 
$response = wp_remote_post( $url, array ( 
'method' => 'POST', 
'headers' => $headers, 
'body' => json_encode( $data ) 
) 
); 
//make sure response isn't an error 
if ( ! is_wp_error( $response ) ) { 
//show the updated post item 
var_dump( wp_remote_retrieve_body( $response ) ); 
} 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
Update Pods 
Same as before but use: 
<json-url>/<pods-api>/<pod-name> 
or 
<json-url>/<pods-api>/<pod-id> 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
AJAX Time! 
GET or POST data asynchronously, and render it in the 
browser. 
Make your site more dynamic and “app” like. 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
Using The REST API Client-JS 
Provides Backbone collections and models for all REST API 
endpoints. 
No Pods integration, but… 
Gives us an easy way to handle authentication 
https://github.com/WP-API/client-js 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
Preparing To Use Client JS 
Enqueue The Script 
Localize a nonce and the root 
JSON url. 
add_action( 'wp_enqueue_scripts', 'json_api_client_js' 
); 
add_action( 'wp_enqueue_scripts', 
'json_api_talk_scripts' ); 
function json_api_talk_scripts() { 
if ( ! function_exists( 'json_get_url_prefix' ) ) { 
return; 
} 
wp_enqueue_script( 'json-api-talk', plugins_url( 
'/json-api-talk.js', __FILE__ ), array( 'jquery' ), 
'1.0', true ); 
} 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
Setup Variables From Localize Data 
(function($){ 
//root JSON URL 
var root_URL = WP_API_Settings.root; 
//API nonce 
var api_NONCE = WP_API_Settings.nonce; 
//Pods endpoint URL 
var pods_URL = WP_API_Settings + 'pods'; 
})(jQuery); 
Prepare URLs and nonce 
from localized data for 
use in functions. 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
Get Items Via AJAX 
function getItem( id, pod ) { 
var URL = pods_URL + '/' + pod + '/' + 'id'; 
$.ajax({ 
type:"GET", 
url: url, 
dataType : 'json', 
beforeSend : function( xhr ) { 
xhr.setRequestHeader( 'X-WP-Nonce', api_Nonce ); 
}, 
success: function(response) { 
//do something 
} 
}); 
} 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
Save Items Via AJAX 
function saveItem( id, pod ) { 
var save_url = podsURL + '/' + pod + '/' + 'id'; 
var title = ''; 
var home_planet = ''; 
var lightsaber_color = ''; 
var JSONObj = { 
"title" : title, 
"home_planet" : home_planet, 
'lightsaber_color' : lightsaber_color, 
"status" : 'publish' 
}; 
//encode data as JSON 
var data = JSON.stringify( JSONObj ); 
$.ajax({ 
type:"POST", 
url: save_url, 
dataType : 'json', 
data: data, 
beforeSend : function( xhr ) { 
xhr.setRequestHeader( 'X-WP-Nonce', apiNonce ); 
}, 
success: function(response) { 
alert( 'WOO!'); 
} 
}); 
} 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
Render With A Handlebars Template 
function getItem( id, pod, templateID, containerID ) { 
var get_url = podsURL + '/' + pod + '/' + 'id'; 
$.ajax({ 
type:"GET", 
url: get_url, 
dataType : 'json', 
beforeSend : function( xhr ) { 
xhr.setRequestHeader( 'X-WP-Nonce', apiNonce ); 
}, 
success: function(response) { 
var source = $( templateID ).html(); 
var template = Handlebars.compile( source ); 
var html = template( data ); 
$( container ).append( html ); 
} 
}); 
} 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
Non WordPress Front-ends 
Angular Client For Pods API 
https://github.com/bjoernklose/angular-wordpress-pods 
Using the WordPress REST API in a mobile app 
http://apppresser.com/using-wordpress-rest-api-mobile-app/ 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
Questions? 
Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014

Más contenido relacionado

La actualidad más candente

Api first design 개발의 선순환
Api first design 개발의 선순환Api first design 개발의 선순환
Api first design 개발의 선순환Jeong-gyu Kim
 
Windows IOCP vs Linux EPOLL Performance Comparison
Windows IOCP vs Linux EPOLL Performance ComparisonWindows IOCP vs Linux EPOLL Performance Comparison
Windows IOCP vs Linux EPOLL Performance ComparisonSeungmo Koo
 
스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)
스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)
스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)포프 김
 
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법YEONG-CHEON YOU
 
2장. Runtime Data Areas
2장. Runtime Data Areas2장. Runtime Data Areas
2장. Runtime Data Areas김 한도
 
샌드박스
샌드박스샌드박스
샌드박스Baekjoon Choi
 
[0806 박민근] 림 라이팅(rim lighting)
[0806 박민근] 림 라이팅(rim lighting)[0806 박민근] 림 라이팅(rim lighting)
[0806 박민근] 림 라이팅(rim lighting)MinGeun Park
 
Building an API with Django and Django REST Framework
Building an API with Django and Django REST FrameworkBuilding an API with Django and Django REST Framework
Building an API with Django and Django REST FrameworkChristopher Foresman
 
Hierachical z Map Occlusion Culling
Hierachical z Map Occlusion CullingHierachical z Map Occlusion Culling
Hierachical z Map Occlusion CullingYEONG-CHEON YOU
 
Visual Studio를 이용한 어셈블리어 학습 part 1
Visual Studio를 이용한 어셈블리어 학습 part 1Visual Studio를 이용한 어셈블리어 학습 part 1
Visual Studio를 이용한 어셈블리어 학습 part 1YEONG-CHEON YOU
 
[0903 구경원] recast 네비메쉬
[0903 구경원] recast 네비메쉬[0903 구경원] recast 네비메쉬
[0903 구경원] recast 네비메쉬KyeongWon Koo
 
Ndc2010 전형규 마비노기2 캐릭터 렌더링 기술
Ndc2010 전형규   마비노기2 캐릭터 렌더링 기술Ndc2010 전형규   마비노기2 캐릭터 렌더링 기술
Ndc2010 전형규 마비노기2 캐릭터 렌더링 기술henjeon
 
191019 Forward / Deferred Rendering
191019 Forward / Deferred Rendering191019 Forward / Deferred Rendering
191019 Forward / Deferred RenderingKWANGIL KIM
 
[Kgc2012] deferred forward 이창희
[Kgc2012] deferred forward 이창희[Kgc2012] deferred forward 이창희
[Kgc2012] deferred forward 이창희changehee lee
 
Introduction to Kotlin coroutines
Introduction to Kotlin coroutinesIntroduction to Kotlin coroutines
Introduction to Kotlin coroutinesRoman Elizarov
 
How object oriented are you feeling today?
How object oriented are you feeling today?How object oriented are you feeling today?
How object oriented are you feeling today?Krzysztof Jelski
 

La actualidad más candente (20)

Api first design 개발의 선순환
Api first design 개발의 선순환Api first design 개발의 선순환
Api first design 개발의 선순환
 
Windows IOCP vs Linux EPOLL Performance Comparison
Windows IOCP vs Linux EPOLL Performance ComparisonWindows IOCP vs Linux EPOLL Performance Comparison
Windows IOCP vs Linux EPOLL Performance Comparison
 
스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)
스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)
스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)
 
CSS FLexBox
CSS FLexBoxCSS FLexBox
CSS FLexBox
 
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법
 
2장. Runtime Data Areas
2장. Runtime Data Areas2장. Runtime Data Areas
2장. Runtime Data Areas
 
샌드박스
샌드박스샌드박스
샌드박스
 
[0806 박민근] 림 라이팅(rim lighting)
[0806 박민근] 림 라이팅(rim lighting)[0806 박민근] 림 라이팅(rim lighting)
[0806 박민근] 림 라이팅(rim lighting)
 
Flask for cs students
Flask for cs studentsFlask for cs students
Flask for cs students
 
Building an API with Django and Django REST Framework
Building an API with Django and Django REST FrameworkBuilding an API with Django and Django REST Framework
Building an API with Django and Django REST Framework
 
Hierachical z Map Occlusion Culling
Hierachical z Map Occlusion CullingHierachical z Map Occlusion Culling
Hierachical z Map Occlusion Culling
 
Visual Studio를 이용한 어셈블리어 학습 part 1
Visual Studio를 이용한 어셈블리어 학습 part 1Visual Studio를 이용한 어셈블리어 학습 part 1
Visual Studio를 이용한 어셈블리어 학습 part 1
 
[0903 구경원] recast 네비메쉬
[0903 구경원] recast 네비메쉬[0903 구경원] recast 네비메쉬
[0903 구경원] recast 네비메쉬
 
Maven
MavenMaven
Maven
 
Ndc2010 전형규 마비노기2 캐릭터 렌더링 기술
Ndc2010 전형규   마비노기2 캐릭터 렌더링 기술Ndc2010 전형규   마비노기2 캐릭터 렌더링 기술
Ndc2010 전형규 마비노기2 캐릭터 렌더링 기술
 
191019 Forward / Deferred Rendering
191019 Forward / Deferred Rendering191019 Forward / Deferred Rendering
191019 Forward / Deferred Rendering
 
[Kgc2012] deferred forward 이창희
[Kgc2012] deferred forward 이창희[Kgc2012] deferred forward 이창희
[Kgc2012] deferred forward 이창희
 
Introduction to Kotlin coroutines
Introduction to Kotlin coroutinesIntroduction to Kotlin coroutines
Introduction to Kotlin coroutines
 
Angular Directives
Angular DirectivesAngular Directives
Angular Directives
 
How object oriented are you feeling today?
How object oriented are you feeling today?How object oriented are you feeling today?
How object oriented are you feeling today?
 

Destacado

No More “Cowboy Coding”: A Best Practices Guide to Local Development & Migration
No More “Cowboy Coding”: A Best Practices Guide to Local Development & MigrationNo More “Cowboy Coding”: A Best Practices Guide to Local Development & Migration
No More “Cowboy Coding”: A Best Practices Guide to Local Development & Migrationpodsframework
 
Building a Rails API with the JSON API Spec
Building a Rails API with the JSON API SpecBuilding a Rails API with the JSON API Spec
Building a Rails API with the JSON API SpecSonja Peterson
 
Five events in the life of every WordPress request you should know
Five events in the life of every WordPress request you should knowFive events in the life of every WordPress request you should know
Five events in the life of every WordPress request you should knowCaldera Labs
 
Ember Data and JSON API
Ember Data and JSON APIEmber Data and JSON API
Ember Data and JSON APIyoranbe
 
Caldera Learn - LoopConf WP API + Angular FTW Workshop
Caldera Learn - LoopConf WP API + Angular FTW WorkshopCaldera Learn - LoopConf WP API + Angular FTW Workshop
Caldera Learn - LoopConf WP API + Angular FTW WorkshopCalderaLearn
 
Connecting Content Silos: One CMS, Many Sites With The WordPress REST API
 Connecting Content Silos: One CMS, Many Sites With The WordPress REST API Connecting Content Silos: One CMS, Many Sites With The WordPress REST API
Connecting Content Silos: One CMS, Many Sites With The WordPress REST APICaldera Labs
 
Build A Killer Client For Your REST+JSON API
Build A Killer Client For Your REST+JSON APIBuild A Killer Client For Your REST+JSON API
Build A Killer Client For Your REST+JSON APIStormpath
 

Destacado (7)

No More “Cowboy Coding”: A Best Practices Guide to Local Development & Migration
No More “Cowboy Coding”: A Best Practices Guide to Local Development & MigrationNo More “Cowboy Coding”: A Best Practices Guide to Local Development & Migration
No More “Cowboy Coding”: A Best Practices Guide to Local Development & Migration
 
Building a Rails API with the JSON API Spec
Building a Rails API with the JSON API SpecBuilding a Rails API with the JSON API Spec
Building a Rails API with the JSON API Spec
 
Five events in the life of every WordPress request you should know
Five events in the life of every WordPress request you should knowFive events in the life of every WordPress request you should know
Five events in the life of every WordPress request you should know
 
Ember Data and JSON API
Ember Data and JSON APIEmber Data and JSON API
Ember Data and JSON API
 
Caldera Learn - LoopConf WP API + Angular FTW Workshop
Caldera Learn - LoopConf WP API + Angular FTW WorkshopCaldera Learn - LoopConf WP API + Angular FTW Workshop
Caldera Learn - LoopConf WP API + Angular FTW Workshop
 
Connecting Content Silos: One CMS, Many Sites With The WordPress REST API
 Connecting Content Silos: One CMS, Many Sites With The WordPress REST API Connecting Content Silos: One CMS, Many Sites With The WordPress REST API
Connecting Content Silos: One CMS, Many Sites With The WordPress REST API
 
Build A Killer Client For Your REST+JSON API
Build A Killer Client For Your REST+JSON APIBuild A Killer Client For Your REST+JSON API
Build A Killer Client For Your REST+JSON API
 

Similar a Introduction to the Pods JSON API

Creating REST Applications with the Slim Micro-Framework by Vikram Vaswani
Creating REST Applications with the Slim Micro-Framework by Vikram VaswaniCreating REST Applications with the Slim Micro-Framework by Vikram Vaswani
Creating REST Applications with the Slim Micro-Framework by Vikram Vaswanivvaswani
 
Teaming up WordPress API with Backbone.js in Titanium
Teaming up WordPress API with Backbone.js in TitaniumTeaming up WordPress API with Backbone.js in Titanium
Teaming up WordPress API with Backbone.js in TitaniumJeroen van Dijk
 
Using the new WordPress REST API
Using the new WordPress REST APIUsing the new WordPress REST API
Using the new WordPress REST APICaldera Labs
 
Building WordPress Client Side Applications with WP and WP-API - #wcmia
Building WordPress Client Side Applications with WP and WP-API - #wcmiaBuilding WordPress Client Side Applications with WP and WP-API - #wcmia
Building WordPress Client Side Applications with WP and WP-API - #wcmiaRoy Sivan
 
Build Modern Web Applications with React and WordPress
Build Modern Web Applications with React and WordPressBuild Modern Web Applications with React and WordPress
Build Modern Web Applications with React and WordPressImran Sayed
 
How to build Client Side Applications with WordPress and WP-API | #wcmia
How to build Client Side Applications with WordPress and WP-API | #wcmiaHow to build Client Side Applications with WordPress and WP-API | #wcmia
How to build Client Side Applications with WordPress and WP-API | #wcmiaRoy Sivan
 
React with WordPress : Headless CMS
React with WordPress : Headless CMSReact with WordPress : Headless CMS
React with WordPress : Headless CMSImran Sayed
 
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!Evan Mullins
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryTatsuhiko Miyagawa
 
Flask and Angular: An approach to build robust platforms
Flask and Angular:  An approach to build robust platformsFlask and Angular:  An approach to build robust platforms
Flask and Angular: An approach to build robust platformsAyush Sharma
 
Building native mobile apps with word press
Building native mobile apps with word pressBuilding native mobile apps with word press
Building native mobile apps with word pressNikhil Vishnu P.V
 
WIRED and the WP REST API
WIRED and the WP REST APIWIRED and the WP REST API
WIRED and the WP REST APIkvignos
 
Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017Matthew Groves
 
Full Stack Development with Node.js and NoSQL
Full Stack Development with Node.js and NoSQLFull Stack Development with Node.js and NoSQL
Full Stack Development with Node.js and NoSQLAll Things Open
 
API Driven Application - AngulatJS, NodeJS and MongoDB | JCertif Tunisia 2015
API  Driven Application - AngulatJS, NodeJS and MongoDB | JCertif Tunisia 2015 API  Driven Application - AngulatJS, NodeJS and MongoDB | JCertif Tunisia 2015
API Driven Application - AngulatJS, NodeJS and MongoDB | JCertif Tunisia 2015 Hamdi Hmidi
 
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013Kiril Iliev
 
Introduction to VueJS & The WordPress REST API
Introduction to VueJS & The WordPress REST APIIntroduction to VueJS & The WordPress REST API
Introduction to VueJS & The WordPress REST APICaldera Labs
 
RESTful API development in Laravel 4 - Christopher Pecoraro
RESTful API development in Laravel 4 - Christopher PecoraroRESTful API development in Laravel 4 - Christopher Pecoraro
RESTful API development in Laravel 4 - Christopher PecoraroChristopher Pecoraro
 
Extending the WordPress REST API - Josh Pollock
Extending the WordPress REST API - Josh PollockExtending the WordPress REST API - Josh Pollock
Extending the WordPress REST API - Josh PollockCaldera Labs
 

Similar a Introduction to the Pods JSON API (20)

Creating REST Applications with the Slim Micro-Framework by Vikram Vaswani
Creating REST Applications with the Slim Micro-Framework by Vikram VaswaniCreating REST Applications with the Slim Micro-Framework by Vikram Vaswani
Creating REST Applications with the Slim Micro-Framework by Vikram Vaswani
 
Teaming up WordPress API with Backbone.js in Titanium
Teaming up WordPress API with Backbone.js in TitaniumTeaming up WordPress API with Backbone.js in Titanium
Teaming up WordPress API with Backbone.js in Titanium
 
Using the new WordPress REST API
Using the new WordPress REST APIUsing the new WordPress REST API
Using the new WordPress REST API
 
Building WordPress Client Side Applications with WP and WP-API - #wcmia
Building WordPress Client Side Applications with WP and WP-API - #wcmiaBuilding WordPress Client Side Applications with WP and WP-API - #wcmia
Building WordPress Client Side Applications with WP and WP-API - #wcmia
 
Build Modern Web Applications with React and WordPress
Build Modern Web Applications with React and WordPressBuild Modern Web Applications with React and WordPress
Build Modern Web Applications with React and WordPress
 
How to build Client Side Applications with WordPress and WP-API | #wcmia
How to build Client Side Applications with WordPress and WP-API | #wcmiaHow to build Client Side Applications with WordPress and WP-API | #wcmia
How to build Client Side Applications with WordPress and WP-API | #wcmia
 
React with WordPress : Headless CMS
React with WordPress : Headless CMSReact with WordPress : Headless CMS
React with WordPress : Headless CMS
 
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
 
Flask and Angular: An approach to build robust platforms
Flask and Angular:  An approach to build robust platformsFlask and Angular:  An approach to build robust platforms
Flask and Angular: An approach to build robust platforms
 
Building native mobile apps with word press
Building native mobile apps with word pressBuilding native mobile apps with word press
Building native mobile apps with word press
 
WIRED and the WP REST API
WIRED and the WP REST APIWIRED and the WP REST API
WIRED and the WP REST API
 
Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017
 
Full Stack Development with Node.js and NoSQL
Full Stack Development with Node.js and NoSQLFull Stack Development with Node.js and NoSQL
Full Stack Development with Node.js and NoSQL
 
API Driven Application - AngulatJS, NodeJS and MongoDB | JCertif Tunisia 2015
API  Driven Application - AngulatJS, NodeJS and MongoDB | JCertif Tunisia 2015 API  Driven Application - AngulatJS, NodeJS and MongoDB | JCertif Tunisia 2015
API Driven Application - AngulatJS, NodeJS and MongoDB | JCertif Tunisia 2015
 
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
 
Introduction to VueJS & The WordPress REST API
Introduction to VueJS & The WordPress REST APIIntroduction to VueJS & The WordPress REST API
Introduction to VueJS & The WordPress REST API
 
RESTful API development in Laravel 4 - Christopher Pecoraro
RESTful API development in Laravel 4 - Christopher PecoraroRESTful API development in Laravel 4 - Christopher Pecoraro
RESTful API development in Laravel 4 - Christopher Pecoraro
 
Extending the WordPress REST API - Josh Pollock
Extending the WordPress REST API - Josh PollockExtending the WordPress REST API - Josh Pollock
Extending the WordPress REST API - Josh Pollock
 
REST API for your WP7 App
REST API for your WP7 AppREST API for your WP7 App
REST API for your WP7 App
 

Último

SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 

Último (20)

SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 

Introduction to the Pods JSON API

  • 1. Introduction to the Pods JSON API Josh Pollock, @josh412 Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 2. What Is The WordPress REST API? A really easy way to move data between sites or inside of a site using the standardized JSON format. Currently a plugin, Hopefully WordPress 4.1 http://wp-api.org https://speakerdeck.com/rmccue/wcmke2014 Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 3. Helpful Functions json_url() ● REST API Root URL ● REST API add_query_arg() ● Add arguments to URLs ● WordPress json_encode() ● Convert PHP to JSON ● PHP json_decode() ● Convert JSON to PHP ● PHP Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 4. The Pods JSON API Extends the WordPress REST API Routes for: ● Pods ● Pods API ● Pods Components https://github.com/pods-framework/pods-json-api Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 5. Authentication Options ● Basic Authentication ● Nonce/Cookie ● Key pairs ● oAuth1 Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 6. Access Filters In Pods JSON API Endpoints in Pods apply_filters( 'pods_json_api_access_pods_' . $method, $access, $method, $pod, $item ); apply_filters( 'pods_json_api_access_pods', $access, $method, $pod, $item ); Endpoints in Pods API apply_filters( 'pods_json_api_access_api_' . $method, $access, $method ); apply_filters( 'pods_json_api_access_api', $access, $method ); Endpoints in Components apply_filters( 'pods_json_api_access_components_' . $method, $access, $method ); apply_filters( 'pods_json_api_access_components', $access, $method ); Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 7. GET vs POST RESTful APIs use the basic HTTP methods: GET POST PUT DELETE We will be using GET to get items and POST to create items. Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 8. Capabilities of The Pods JSON API ○ Show Pods and content ○ Save Pods ○ Create Pods and Fields ○ Import a Pods Package ○ Activate/ deactivate components Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 9. The WordPress HTTP API A simple PHP API in WordPress for making HTTP requests. Helpful functions such as: wp_remote_get() http://codex.wordpress.org/Function_Reference/wp_remote_get wp_remote_retrieve_body() http://codex.wordpress.org/Function_API/wp_remote_retrieve_body Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 10. Getting Pods Items Make a GET request to <json-url>/pods/<pod> or <json-url>/pods/<pod>/<id> $headers = array ( 'Authorization' => 'Basic ' . base64_encode( 'username' . ':' . 'password' ), ); $url = json_url( 'pods/jedi' ); $response = wp_remote_post( $url, array ( 'method' => 'GET', 'headers' => $headers, ) ); //make sure response isn't an error if ( ! is_wp_error( $response ) ) { //show the updated post item var_dump( wp_remote_retrieve_body( $response ) ); } Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 11. Using Pods Find Add the parameters to the URL, using add_query_arg() $headers = array ( 'Authorization' => 'Basic ' . base64_encode( 'username' . ':' . 'password' ), ); $url = json_url( 'pods/jedi' ); $params = array( 'home_world.post_title' => 'Tatooine' ); $url = add_query_arg( $params, $url ); $response = wp_remote_post( $url, array ( 'method' => 'GET', 'headers' => $headers, ) ); //make sure response isn't an error if ( ! is_wp_error( $response ) ) { //show the updated post item var_dump( wp_remote_retrieve_body( $response ) ); } Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 12. Saving Pods Items Make POST request to New item: <json-url>/<pod> Update item: <json-url>/<pod>/<id> $data = array( 'home_planet' => 'Alderann' ); $url = json_url( 'pods/jedi/9' ); $headers = array ( 'Authorization' => 'Basic ' . base64_encode( 'username' . ':' . 'password' ), ); $response = wp_remote_post( $url, array ( 'method' => 'POST', 'headers' => $headers, 'body' => json_encode( $data ) ) ); //make sure response isn't an error if ( ! is_wp_error( $response ) ) { //show the updated post item var_dump( wp_remote_retrieve_body( $response ) ); } Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 13. Creating Pods POST to <json-url>/<pods-api> Body of request passed to PodsAPI->save_pod() $data = array( 'name' => 'jedi', 'type' => 'post_type', ); $url = json_url( 'pods-api' ); $headers = array ( 'Authorization' => 'Basic ' . base64_encode( 'username' . ':' . 'password' ), ); $response = wp_remote_post( $url, array ( 'method' => 'POST', 'headers' => $headers, 'body' => json_encode( $data ) ) ); //make sure response isn't an error if ( ! is_wp_error( $response ) ) { //show the updated post item var_dump( wp_remote_retrieve_body( $response ) ); } Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 14. Update Pods Same as before but use: <json-url>/<pods-api>/<pod-name> or <json-url>/<pods-api>/<pod-id> Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 15. AJAX Time! GET or POST data asynchronously, and render it in the browser. Make your site more dynamic and “app” like. Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 16. Using The REST API Client-JS Provides Backbone collections and models for all REST API endpoints. No Pods integration, but… Gives us an easy way to handle authentication https://github.com/WP-API/client-js Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 17. Preparing To Use Client JS Enqueue The Script Localize a nonce and the root JSON url. add_action( 'wp_enqueue_scripts', 'json_api_client_js' ); add_action( 'wp_enqueue_scripts', 'json_api_talk_scripts' ); function json_api_talk_scripts() { if ( ! function_exists( 'json_get_url_prefix' ) ) { return; } wp_enqueue_script( 'json-api-talk', plugins_url( '/json-api-talk.js', __FILE__ ), array( 'jquery' ), '1.0', true ); } Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 18. Setup Variables From Localize Data (function($){ //root JSON URL var root_URL = WP_API_Settings.root; //API nonce var api_NONCE = WP_API_Settings.nonce; //Pods endpoint URL var pods_URL = WP_API_Settings + 'pods'; })(jQuery); Prepare URLs and nonce from localized data for use in functions. Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 19. Get Items Via AJAX function getItem( id, pod ) { var URL = pods_URL + '/' + pod + '/' + 'id'; $.ajax({ type:"GET", url: url, dataType : 'json', beforeSend : function( xhr ) { xhr.setRequestHeader( 'X-WP-Nonce', api_Nonce ); }, success: function(response) { //do something } }); } Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 20. Save Items Via AJAX function saveItem( id, pod ) { var save_url = podsURL + '/' + pod + '/' + 'id'; var title = ''; var home_planet = ''; var lightsaber_color = ''; var JSONObj = { "title" : title, "home_planet" : home_planet, 'lightsaber_color' : lightsaber_color, "status" : 'publish' }; //encode data as JSON var data = JSON.stringify( JSONObj ); $.ajax({ type:"POST", url: save_url, dataType : 'json', data: data, beforeSend : function( xhr ) { xhr.setRequestHeader( 'X-WP-Nonce', apiNonce ); }, success: function(response) { alert( 'WOO!'); } }); } Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 21. Render With A Handlebars Template function getItem( id, pod, templateID, containerID ) { var get_url = podsURL + '/' + pod + '/' + 'id'; $.ajax({ type:"GET", url: get_url, dataType : 'json', beforeSend : function( xhr ) { xhr.setRequestHeader( 'X-WP-Nonce', apiNonce ); }, success: function(response) { var source = $( templateID ).html(); var template = Handlebars.compile( source ); var html = template( data ); $( container ).append( html ); } }); } Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 22. Non WordPress Front-ends Angular Client For Pods API https://github.com/bjoernklose/angular-wordpress-pods Using the WordPress REST API in a mobile app http://apppresser.com/using-wordpress-rest-api-mobile-app/ Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014
  • 23. Questions? Building Applications: Introduction to the Pods JSON API // Josh Pollock // PodsCamp 2014