ebook img

REST API in WordPress PDF

209 Pages·2016·4.64 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview REST API in WordPress

Learning WordPress REST API A practical tutorial to get you up and running with the revolutionary WordPress REST API Sufyan bin Uzayr BIRMINGHAM - MUMBAI Learning WordPress REST API Copyright © 2016 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: July 2016 Production reference: 1180716 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78646-924-3 www.packtpub.com Credits Authors Copy Editor Sufyan bin Uzayr Safis Editing Mathew Rooney Reviewer Project Coordinator Ahmad Awais Ulhas Kambali Commissioning Editor Proofreader Amarabha Banerjee Safis Editing Acquisition Editors Indexer Anurag Banerjee Tejal Daruwale Soni Reshma Raman Content Development Editor Production Coordinator Prashanth G Aparna Bhagat Technical Editor Cover Work Shivani K. Mistry Aparna Bhagat About the Authors Sufyan bin Uzayr is a writer and web developer with experience and an interest in a lot of things related to web design and development. He has worked with numerous Content Management Systems and frameworks, and writes about web design, web development, content production, branding, and typography for several blogs and magazines of repute. He also has a background in Linux administration, database management, cloud computing, and web hosting. Sufyan is an open source enthusiast. He can code in PHP, RoR, and Perl, and is also proficient in JavaScript, jQuery, and HTML5/CSS3, as well as several other web development trends. Sufyan primarily uses WordPress and Drupal for both personal and client projects, and often turns towards MODX for the deployment of cloud sites. He has been working with Drupal, WordPress, and other CMSs for almost a decade by now. Sufyan is a prolific author, and has written several books on a diverse range of topics, including concrete5 for developers (published by Packt Publishing in 2014). He is associated with various publications in the field of web design and development, both in writing and editorial capacity. He has also served as the News Editor and Technical Supervisor, as well as Editor-in-Chief, for multiple web development magazines, both online and in print. Apart from technology and coding, Sufyan also takes a keen interest in topics such as History, Current Affairs, Foreign Policy and Politics, and regularly appears on television and radio shows around the world. He is also a featured columnist for multiple journals and news publications focusing on foreign policy and international relations. Sufyan's writings on contemporary issues are simultaneously translated into different languages, and his works are cited in academic and critical journals on a regular basis. Sufyan manages h t t p s : / / c o d e c a r b o n . c o m, which features an assortment of useful tools and resources for web developers. Updated regularly, Code Carbon offers JavaScript frameworks and libraries, as well as resources related to HTML/CSS, PHP, Python, Ruby, and of course, WordPress. You can learn more about Sufyan's writings and other non-technical works at the following website: h t t p : / / s u f y a n i s m . c o m. Mathew Rooney is a coder with multiple years of experience in the web development industry. He works with PHP, JavaScript, and offers custom-coded WordPress themes and plugins. Mathew is a firm believer in open source software and has been using WordPress for nearly 5 years. Acknowledgments There are several people who deserve to be this page, because this book would not have come into existence without their support. Some names deserve a special mention, and I am genuinely indebted to: Mathew Rooney, for the help he offered by co-authoring sections of this book. A good part of the code in different segments and chapters of this book was handled by him. Reshma Raman, for ensuring that the book stays on track, and the outline and chapter division is in the best possible shape. Prashanth G, for editing the book, and making sure that the content is in order, and also for formatting the manuscript to make it adhere to the Packt style guide. Shivani Mistry, for the technical edits, and for taking care of the book during the production stage. Joe Perkins, and all the great folks at Tap Managed WordPress hosting, for offering me a free WordPress setup with no restrictions, wherein I could implement and debug the code. Stelian Subotin, for helping me remain calm by keeping track of the theoretical aspects of the book. Ahmad Awais, for reviewing the manuscript, and for providing his helpful insight and critical assessment. And of course, the core contributors of WordPress, the team behind WP REST API, as well as the millions within the WordPress community -- this book would not have existed had WordPress not been there, and WordPress itself would not be so popular if it were not for the amazing community. -- Sufyan bin Uzayr About the Reviewer Ahmad Awais is a senior full stack web and business development strategist with substantial industrial experience in development, design, training, and writing everything about WordPress. He blogs at h t t p s : / / A h m a d A w a i s . c o m / and tweets at @MrAhmadAwais. He also contributes to projects such as WP-API, WP Customize Component, WooCommerce, TwentySixteen, Easy Digital Downloads, and the WordPress, PHP, and JS Communities. Ahmad is also one of the keenest open source evangelists; a core contributor at WordPress; a maker of lots of FOSS (Free and Open Source Software), especially WPGulp Boilerplate being used by more than 100 developers, and Sublime Text WordPress Customizer Package, helping about 1,000 developers write quality code with ease. He is a published author and WordPress Content Lead at sites such as WPLift, Envato Tuts+, Torque Mag by WPEngine, SitePoint, SmashingMagazine, CreativeMarket, HongKiat, SpeckyBoy, wpMail, Post Status, WPBeginner, TheLayout by FlyWheel, ProductHunt Maker, and so on. I'd like to thank my parents, Maedah Batool (WP Journalist) for their never-ending support; Packt Publishing, the WordPress Core Team, and the community (developers, designers, and users), without whom none of this would have been possible. www.PacktPub.com For support files and downloads related to your book, please visit www.PacktPub.com. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. h t t p s : / / w w w 2 . p a c k t p u b . c o m / b o o k s / s u b s c r i p t i o n / p a c k t l i b Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books. Why subscribe? Fully searchable across every book published by Packt Copy and paste, print, and bookmark content On demand and accessible via a web browser Free access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access. Table of Contents Chapter 1: Getting Started with REST API 6 Introducing REST API 6 Defining API 6 Defining REST 7 Defining JSON 8 Using REST API in real-world applications 9 Advantages of REST services 10 Key considerations when working with REST 11 Architectural components in REST 11 Design principles in REST 11 Getting started with REST implementation 12 Passing commands in SOAP versus REST 12 Handling data in REST 14 Using REST in different programming languages 14 Ruby 15 Python 15 Perl 16 C# 17 Java 19 PHP 21 JavaScript 22 REST API in WordPress 23 Universality 24 Remote management 25 Third-party support 25 Summary 26 Chapter 2: Interacting with REST API in WordPress 27 Getting started 27 Issuing requests via Postman 28 HTTP API in WordPress 32 Fetching GET post output in JSON objects 33 Issuing queries 35 Interacting REST API via PHP 36 Explanation of function 37

Description:
critical assessment. And of course, the core contributors of WordPress, the team behind WP REST API, as well as the millions within the WordPress . How to GET user data using REST API in WordPress. 55 .. such, REST focuses more on efficiency and speed and offers cross-platform data exchange.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.