Upgrade to Pro — share decks privately, control downloads, hide ads and more …

WordBench東京 3月ハンズオン

WordBench東京 3月ハンズオン

Hidetaka Okamoto

March 21, 2016
Tweet

More Decks by Hidetaka Okamoto

Other Decks in Programming

Transcript

  1. ࠓ೔࿩͢͜ͱ ▸ WP REST API͕ Ͳ͏࢖ΘΕ͍ͯΔ͔ ▸ WP REST APIͷ

    ؆୯ͳ࢖͍ํ ▸ WP REST APIΛ ࢖ͬͯΈͯײͨ͜͡ͱ WordBenchεϥΠυ
  2. HIDE(Ԭຊलߴʣ ▸ σδλϧΩϡʔϒ ΤϯδχΞ ▸ WordBenchژ౎ϞσϨʔλ ▸ ଠޑͷਓ ▸ ཉ͍͠΋ͷϦετˣ

    ▸ http://www.amazon.co.jp/registry/ wishlist/1UYH9PSDMB3FZ WordBenchεϥΠυ
  3. WordBench Tokyo WP REST APIͷ࢖͍ํ͋Ε͜Ε ▸ ϦΞϧλΠϜϑΟʔυʢNYTIMESʣ ▸ ΠϯλϥΫςΟϒͳݕࡧϑΥʔϜʢwp-kyotoʣ ▸

    ֎෦͔Βͷهࣄ࡞੒ʢWIREDʣ ▸ ֎෦͔ΒͷαΠτ؅ཧʢWP-CLI / WordPress.comʣ ▸ ΞϓϦ΁ͷల։ʢNomadbaseʣ
  4. WordBench Tokyo WP REST APIͷ࢖͍ํ͋Ε͜Ε ▸ ϦΞϧλΠϜϑΟʔυʢNYTIMESʣ ▸ ΠϯλϥΫςΟϒͳݕࡧϑΥʔϜ(wp-kyoto) ▸

    ֎෦͔Βͷهࣄ࡞੒ʢWIREDʣ ▸ ֎෦͔ΒͷαΠτ؅ཧʢWP-CLI / WordPress.comʣ ▸ ΞϓϦ΁ͷల։ʢNomadbaseʣ
  5. WordBench Tokyo WP REST APIͷ࢖͍ํ͋Ε͜Ε ▸ ϦΞϧλΠϜϑΟʔυʢNYTIMESʣ ▸ ΠϯλϥΫςΟϒͳݕࡧϑΥʔϜʢwp-kyotoʣ ▸

    ֎෦͔Βͷهࣄ࡞੒ʢWIREDʣ ▸ ֎෦͔ΒͷαΠτ؅ཧʢWP-CLI / WordPress.comʣ ▸ ΞϓϦ΁ͷల։ʢNomadbaseʣ
  6. WordBench Tokyo WP REST APIͷ࢖͍ํ͋Ε͜Ε ▸ ϦΞϧλΠϜϑΟʔυʢNYTIMESʣ ▸ ΠϯλϥΫςΟϒͳݕࡧϑΥʔϜʢwp-kyotoʣ ▸

    ֎෦͔Βͷهࣄ࡞੒ʢWIREDʣ ▸ ֎෦͔ΒͷαΠτ؅ཧ(WP-CLI / WordPress.com) ▸ ΞϓϦ΁ͷల։ʢNomadbaseʣ
  7. WordBench Tokyo WP REST APIͷ࢖͍ํ͋Ε͜Ε ▸ ϦΞϧλΠϜϑΟʔυʢNYTIMESʣ ▸ ΠϯλϥΫςΟϒͳݕࡧϑΥʔϜʢwp-kyotoʣ ▸

    ֎෦͔Βͷهࣄ࡞੒ʢWIREDʣ ▸ ֎෦͔ΒͷαΠτ؅ཧʢWP-CLI / WordPress.comʣ ▸ ΞϓϦ΁ͷల։ʢNomadbaseʣ
  8. ϋϯζΦϯͷ͓໿ଋ ▸ JavaScript͸͙͢ʹյΕΔ΋ͷͱߟ͑Δ ▸ ಈ͔ͳ͘ͳͬͯ΋߄ͯͳ͍ ▸ ·ͣ͸શ֯εϖʔεɾߦ຤ͷʮ;ʯͦͯ͠ด͡๨ΕΛٙ͏ ▸ ճઢ͕ࠞࡶ͍ͯ͠Δ৔߹΋͋ΔͷͰযΒͳ͍ ▸

    APIΫΤϦ͸WP REST API Console΍curl + jqͰࣄલʹνΣοΫ ▸ ׬੒඼͕͋ΔʢʹՈͰ΋෮शՄೳʣͷͰࣄނͬͯ΋ٽ͔ͳ͍ WordBench Tokyo
  9. Πϯετʔϧ͢Δ΋ͷΛؒҧ͑ͳ͍ API໊ ϓϥάΠϯ໊ URL උߟ WP REST API v1 WP

    REST API (WP API) https://wordpress.org/ plugins/json-rest-api/ v2͕ࢮ͵ 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/ ̐೥Ҏ্ ϝϯςͳ͠ WordBench Tokyo
  10. Πϯετʔϧ͢Δ΋ͷΛؒҧ͑ͳ͍ API໊ ϓϥάΠϯ໊ URL උߟ WP REST API v1 WP

    REST API (WP API) https://wordpress.org/ plugins/json-rest-api/ v2͕ࢮ͵ 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/ ̐೥Ҏ্ ϝϯςͳ͠ WordBench Tokyo
  11. WordBench Tokyo ·ͱΊ ▸ WP REST API͸·ͩ·ͩൃల్্ ▸ ͱ͸͍͑ؾ͕͚ͭ͹ελϯμʔυԽͦ͠͏ ▸

    ࢮͳͳ͍ൣғͰ๯ݥ͓͍ͯͯ͠ଛ͸͠ͳ͍ʢ͸ͣʣ ▸ ΋ͬͱREST APIͷهࣄ΍ίʔυΛʂ