of 99 /99
WORDCAMP US参加レポート WORDBENCH京都12

WordBench京都12月、WordCampUSからのWP REST APIな話

Embed Size (px)

Text of WordBench京都12月、WordCampUSからのWP REST APIな話

  • WORDCAMP US WORDBENCH12

  • WORDCAMP US ~WP REST API~

    WORDBENCH12

  • WORDCAMP US2015/12/04~12/06

  • WordBench12

    WORDCAMP US2015

    WordPress.com API

    WP REST API

    WP REST API

    http://WordPress.com

  • GLOBAL WAPUU

  • WORDBENCH12

    GPL v2

    2014

    https://ja.wordpress.org/about-wp-ja/wapuu/

  • WordBench12

    http://jawordpressorg.github.io/wapuu/

  • WordBench12

    GitHub

    https://github.com/jawordpressorg/wapuu

  • WordBench12

    http://wapuu.jp/

    http://wapuu.jp/

  • WordBench12

    http://wapuu.amimoto-ami.com/

    http://wapuu.amimoto-ami.com/

  • WordPress.com API

    http://WordPress.com

  • CALYPSO

  • WordBench12

    CALYPSO

    React + WordPress.com API

    WordPress

    UIWordPress.com

    https://developer.wordpress.com/calypso/

    https://github.com/Automattic/wp-calypso

    http://WordPress.comhttp://WordPress.comhttps://developer.wordpress.com/calypso/https://github.com/Automattic/wp-calypso

  • https://developer.wordpress.com/docs/api/

  • WordBench12

    WORDPRESS.COM REST API

    WordPress.comAPI

    JetPackCalypso

    .orgJetPack

    WP REST API

    https://developer.wordpress.com/docs/api/

    http://WordPress.comhttp://WordPress.comhttps://developer.wordpress.com/docs/api/

  • WordBench12

    WP REST API

    WP REST API.com API

    WP REST APIv1v2

    WP API

  • WordBench12

    API URL

    .com API JetPack https://wordpress.org/plugins/jetpack/.com

    WP REST

    API v1WP REST API

    (WP API)https://wordpress.org/plugins/json-rest-api/

    WP REST API v2

    WordPress REST API (Version 2)

    https://wordpress.org/plugins/rest-api/

    (WP4.4~)

    WP API WP API https://wordpress.org/plugins/wp-api/

  • WP-API

  • WordBench12

    WP API WordPressAPI

    Version2

    WP4.21

    OmEmbedcamp.orgv

    V1V2

    http://camp.org

  • WordBench12

    WP REST API

    WordPressAPI

    / / / / etc..

    WordPress4.2

    WP4.4

  • WordBench12

    WordPress4.4 REST API

    oEmbedAPI

    API

  • WordBench12

    WordPress4.4

    /wp-json/

    WP API

    /wp-json/oembed/1.0

    oEmbedAPI

    /wp-json/oembed/1.0/embed

    oEmbed

  • oEmbed

  • WordBench12

    WP REST API v2

    /wp-json/wp/v2/

    /wp-json/wp/v2/categories

    /wp-json/wp/v2/media

    /wp-json/wp/v2/pages

    /wp-json/wp/v2/posts

    /wp-json/wp/v2/tags

    /wp-json/wp/v2/taxonomies

    /wp-json/wp/v2/users

  • http://v2.wp-api.org/

  • Hidetaka Okamoto

    WordBench12

  • curl -X GET \ http://example.com/wp-json/wp/v2/ \ | jq .

  • WordBench12

    WordPress4.4

    "/wp/v2/comments": { "namespace": "wp/v2", "methods": [ "GET", "POST" ], "endpoints": [ { "methods": [ "GET" ], "args": { "context": { "required": false, "default": "view", "enum": [ "view", "embed", "edit" ], "description": "Scope under which the request is made; determines fields present in response." }, "page": {

  • WordBench12

    URL

    "/wp/v2/comments": { "namespace": "wp/v2", "methods": [ "GET", "POST" ], "endpoints": [ { "methods": [ "GET" ], "args": { "context": { "required": false, "default": "view", "enum": [ "view", "embed", "edit" ], "description": "Scope under which the request is made; determines fields present in response." }, "page": {

  • WordBench12

    "/wp/v2/comments": { "namespace": "wp/v2", "methods": [ "GET", "POST" ], "endpoints": [ { "methods": [ "GET" ], "args": { "context": { "required": false, "default": "view", "enum": [ "view", "embed", "edit" ], "description": "Scope under which the request is made; determines fields present in response." }, "page": {

  • WordBench12

    GET

    "/wp/v2/comments": { "namespace": "wp/v2", "methods": [ "GET", "POST" ], "endpoints": [ { "methods": [ "GET" ], "args": { "context": { "required": false, "default": "view", "enum": [ "view", "embed", "edit" ], "description": "Scope under which the request is made; determines fields present in response." }, "page": {

  • curljq

  • WordBench12

    var url = 'http://wp-kyoto.net/wp-json/'; $.ajax({ url: url + wp/v2/posts', type:GET, dataType: 'json', data : { filter: { s: wp-api', posts_per_page: 5 } }, timeout:10000, }).done(function(datas) { for (var i = datas.length - 1; i >= 0; i--) { var post_url = datas[i]['link']; $.ajax({ url: url + 'oembed/1.0/embed?url='+ post_url, type:GET', dataType: json', timeout:10000, }).done(function(data) {$('#ajax').append(data['html']); }).fail(function(data) { $('#ajax').append('fail');}); } }).fail(function(datas) { $('#ajax').append('fail'); });

  • WordBench12

    var url = 'http://wp-kyoto.net/wp-json/'; $.ajax({ url: url + wp/v2/posts', type:GET, dataType: 'json', data : { filter: { s: wp-api', posts_per_page: 5 } }, timeout:10000, }).done(function(datas) { for (var i = datas.length - 1; i >= 0; i--) { var post_url = datas[i]['link']; $.ajax({ url: url + 'oembed/1.0/embed?url='+ post_url, type:GET', dataType: json', timeout:10000, }).done(function(data) {$('#ajax').append(data['html']); }).fail(function(data) { $('#ajax').append('fail');}); } }).fail(function(datas) { $('#ajax').append('fail'); });

    POSTSAPI

  • WordBench12

    var url = 'http://wp-kyoto.net/wp-json/'; $.ajax({ url: url + wp/v2/posts', type:GET, dataType: 'json', data : { filter: { s: wp-api', posts_per_page: 5 } }, timeout:10000, }).done(function(datas) { for (var i = datas.length - 1; i >= 0; i--) { var post_url = datas[i]['link']; $.ajax({ url: url + 'oembed/1.0/embed?url='+ post_url, type:GET', dataType: json', timeout:10000, }).done(function(data) {$('#ajax').append(data['html']); }).fail(function(data) { $('#ajax').append('fail');}); } }).fail(function(datas) { $('#ajax').append('fail'); });

    oEmbedAPIAjax

  • WordBench12

    var url = 'http://wp-kyoto.net/wp-json/'; $.ajax({ url: url + wp/v2/posts', type:GET, dataType: 'json', data : { filter: { s: wp-api', posts_per_page: 5 } }, timeout:10000, }).done(function(datas) { for (var i = datas.length - 1; i >= 0; i--) { var post_url = datas[i]['link']; $.ajax({ url: url + 'oembed/1.0/embed?url='+ post_url, type:GET', dataType: json', timeout:10000, }).done(function(data) {$('#ajax').append(data['html']); }).fail(function(data) { $('#ajax').append('fail');}); } }).fail(function(datas) { $('#ajax').append('fail'); });

    oEmbedAPIAjax

  • WordBench12

    var url = 'http://wp-kyoto.net/wp-json/'; $.ajax({ url: url + wp/v2/posts', type:GET, dataType: 'json', data : { filter: { s: wp-api', posts_per_page: 5 } }, timeout:10000, }).done(function(datas) { for (var i = datas.length - 1; i >= 0; i--) { var post_url = datas[i]['link']; $.ajax({ url: url + 'oembed/1.0/embed?url='+ post_url, type:GET', dataType: json', timeout:10000, }).done(function(data) {$('#ajax').append(data['html']); }).fail(function(data) { $('#ajax').append('fail');}); } }).fail(function(datas) { $('#ajax').append('fail'); });

    oEmbedAPIHTML

  • https://feelingrestful.com/

  • WP-API

  • WP REST API

    Someone

    WordBench12

  • WordBench12

    WP REST API SOMETHING

    WP REST API Plugins

    WP REST API Themes

    WP REST API Application

    WP REST API Other API

    WP REST API Internet Of Things

  • WordBench12

    WP REST API PLUGINS

    WP REST API

  • https://wordpress.org/plugins/wp-search-live/

  • http://wp-kyoto.net/using-wp-api-shortcode-wbnara/

  • WP REST API v1

  • WordBench12

    WP REST API THEMES

    WP REST API WordPress

    WP REST API v2OK

    Reactbackbone

    PHP

  • wptavern.com/anadama-an-example-wordpress-recipe-theme-based-on-react

  • http://media-assembly-kit.com/ja/

  • https://github.com/Automattic/Picard

  • PHPJS

  • WordBench12

    WP REST API APPLICATION

    WP REST API

    WordPress FW

  • http://www.happytables.com/

  • https://nomadbase.io/

  • WordBench12

    WP REST API IOT

    Internet Of Things()

    WP REST API

    GUIWordPress

  • https://ja.wordpress.org/plugins/littlebits/

  • https://ja.wordpress.org/plugins/littlebits/

  • WordPress

  • Web WordPress

  • https://developer.amazon.com/appsandservices/solutions/alexa/alexa-skills-kit/docs/developing-an-alexa-skill-as-a-lambda-function

  • AWS WodPress

  • WordBench12

    WordCamp US

    _s+backbone / React GitHub

    OAuthHappyTable

    nomadobase

    Internet Of ThingsAlexa,littlebits,IFTTT

  • PHP

  • LEARN JAVASCRIPT DEEPLY.

    Matt Mullenweg

    WordBench12

  • PHP

  • WordBench12

    WP REST API

    WP REST API

    etc..

    API=

    APIPHP

  • WordBench12

    WordPress

    APIPHP

    APIJavaScript

    DOM

  • WordBench12

    get_options()

    HTMLdata

    JSAPI

    http://wp-kyoto.net/wp-rest-api-get-posts-per-page/

  • WebComponent

  • WordBench12

    WEBCOMPONENT+WP REST API

    HTML

    JavaScript

    Component

    Component

    WP REST API

  • US

    Hidetaka Okamoto

    WordBench12