CodeCanyon
CodeCanyon
Code
Code
Code
Code
Code
Code

SMIO Wordpress API Complete Solution

SMIO Wordpress API Complete Solution

What we provide?

We provide a complete solution to give an access or share any content of your Wordpress blog through an JSON/XML API, with very high secure different levels and full control in every API service and every data element in the services.
Full integration with Advanced Custom Fields Free and Pro to build a very dynamic and custom APIs.
Monitor the size of API requests for each account by visual statistics and control in the allowed size of requests.
Plugin is ready for Web and Mobile development and Templates design.

Extra Help !

Our plugin can retrieve any data from Wordpress and its plugins but this depending on your reading for plugin documentation and if you don’t know how we will help you for free over our support center http://smartiolabs.com/support

For example

You need to retrieve all posts for custom post type `product` user categories 1,4,6 and make a search in the post table columns besides the postmeta table columns and finally order your results with one of the post meta values.
Simply you can build easily build this query using the plug-in service `getposts` and the request will be something like that:

http://smartiolabs.com/demo/api/getposts/?categoryid=1,4,6&custom_post=product&custom_search_and={"comment_count":"between 1 and 100","post_title":"like 'test'","post_author":"='1'"}&custom_meta_and={"price":">=300","size":"in(1,3,5,8)"}&orderby=postmeta.price&order=desc

For who?

Normal User: Share your Wordpress content with anybody.
Mobile developers: Easily access to API services for getting any data from Wordpress, Plugin is ready for mobile development.
Web developers: Use API functions in your plugins development.
Templates designers: Use API functions inside your templates.

Additional Plans:

We also provide additional plans for developers and enterprises here

API Services

  • User operations:
  • Login
  • Singup
  • Social signup and login
  • Edit the user profile
  • Lost password
  • Change user password
  • Change user profile image
  • List of authors
  • Get full profile for author
  • List of posts published by an author
  • Get posts that user comment in it
  • Posts:
  • Publish new post
  • Update or edit a post
  • Upload media file
  • Get posts by category or custom taxonomy
  • Search in posts
  • Last posts in blog
  • Popular Posts in range days
  • Get posts by post format
  • View post by id
  • Archive
  • Get posts by archive time
  • Comments:
  • Get comments of a post
  • Comment in a post
  • Update or edit a comment
  • Last comments in the blog
  • View comment by ID
  • Pages:
  • Get list of pages
  • View a page by ID
  • Categories:
  • Get list of all categories
  • View a category by ID
  • Taxonomies:
  • Get a list of all custom taxonomies
  • View custom taxonomy object
  • Tags:
  • Get list of all tags
  • Get posts by tag
  • Services:
  • Display the list of network sites
  • Social accounts links and stats
  • Blog options and information
  • Contact Wordpress administrator
  • Management Actions:
  • Change the post status
  • Change the comment status
  • Delete user permanently
  • Delete post permanently
  • Delete comment permanently
  • Custom Services & Options:
  • Call one of the custom services you made
  • Get a list of all custom options value
  • Push Notification:
  • Save new device token
  • Edit the device subscription in channels
  • Get a list of channels and whichever device subscribed
  • Get the list of all channels

Features

  • Outputs two different data types XML / JSON / JSONP
  • OAuth 2.0 Authentication for high security
  • Full integration with Advanced Custom Fields Free and Pro to build a very dynamic and custom APIs
  • OAuth log-in page authentication to protect your content from stealing
  • Special permissions for every OAuth client ID
  • API usage limit for every OAuth access token
  • Complex authentication level for the premium content
  • Client management system for OAuth 2.0
  • Complete statistics for API usage
  • Support Geolocation services
  • API Full control : Enable/Disable every API service & every callback parameters
  • Determine the access level role for every API service
  • Build your own service that you make you to build a custom API service
  • Create custom options for end-user to make him customise the application
  • Support custom taxonomies, custom fields, custom post types and meta boxes
  • Many of dynamic options to you (developer) and to the end-user
  • Full integration with Wordpress’s core
  • Integrates with some awesome plugins and there is a future plan to more other plugins
  • Special settings for the application allows the user full control over the many options
  • Full integration with Wordpress options and settings
  • Support post formats in Wordpress 3.8
  • All inputs are filtered and secured
  • Check required inputs for every method and show errors if missed any parameter
  • Tables and rows are fixed so no output tags will change and that’s mean no app crashes will happen
  • Option to use API with an authentication key
  • Full documentation embedded inside the plugin for developer use
  • Option to Enable or Disable developer mode

Push Notification System

Mobile push notification features require “Push Notification System” plugin .

API integrates with the following plugins:

Categories Images plugin
Advanced Custom Fields plugin
Stats module in Jetpack plugin
Social Count Plus plugin
Mobile Push Notification Messages plugin

Code Samples

OAuth Example

<?php
/*
Download source library from
http://smartiolabs.com/blog/wordpress-api-plugin-oauth-lib/
*/
require('OAuth.php');

const CLIENT_ID     = 'REPLACE_CLIENT_ID';
const CLIENT_SECRET = 'REPLACE_CLIENT_SECRET';

const REDIRECT_URI           = 'http://smartiolabs.com/demo/oauth/callback.php';
const AUTHORIZATION_ENDPOINT = 'http://smartiolabs.com/demo/api/authorize/';
const TOKEN_ENDPOINT         = 'http://smartiolabs.com/demo/api/access_token/';

$client = new OAuth2\Client(CLIENT_ID, CLIENT_SECRET);
if (!isset($_GET['code'])){
    $auth_url = $client->getAuthenticationUrl(AUTHORIZATION_ENDPOINT, REDIRECT_URI);
    header('Location: ' . $auth_url);
}
else{
    $params = array('code' => $_GET['code'], 'redirect_uri' => REDIRECT_URI);
    $response = $client->getAccessToken(TOKEN_ENDPOINT, 'authorization_code', $params);
    $client->setAccessToken($response['result']['access_token']);

    $params = array(
    'limit' => 20, //Limit of result data
    'range' => 30, //Number of days to calculate and return the most popular posts
    'custom_post' => 'video',
    'siteid' => 0
    );

    $response = $client->fetch('http://smartiolabs.com/demo/api/popular_posts/', $params, 'POST');
    echo json_encode($response['result']);
}

?>

Built-in Function Example

<?php

$args = array(
'limit' => '20',
'range' => 30, //Number of days to calculate and return the most popular posts
'custom_post' => 'video',
'siteid' => 0
);

$fetch = new smapi_core('popular_posts', $args);
if($fetch->error !== false){
  echo $fetch->error;
}
else{
  foreach($fetch->result as $post){
    echo $post['post_title'];
  }
}

?>

Javascript Use

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
$.ajax({
  url: 'http://smartiolabs.com/demo/popular_posts/?limit=20&siteid=',
  type: 'GET',
  dataType: 'jsonp',
  success: function (data, response) {
    if (response == 'success') {
        console.log(data);
    }
  }
});
</script>

Try it now

http://smartiolabs.com/demo/wp-admin

  • Note: Some features in control panel will be disabled for security reasons
  • User: admin
  • Password: demo

How to install?

Just upload plugin files to the specified folder and sure that Permalink system is enabled

Documentation

  • Full documentation embedded inside the plugin UI for developer use
  • Full documentation exists with plugin files
  • For quick view and test you can visit this link:
http://smartiolabs.com/demo/documentation

Requirements

  • Wordpress release 3.0 or later
  • PHP version 5.2.4 or later

Note:

If you found this tool is useful please don’t forget to rate us or share\like the link in your social media.

Subscribe to get plugin future updates and share with you the updates roadmap

Credits:

Support

We will be happy if you ask us for any help http://smartiolabs.com/support

Changelog

Version 4.5 – 05/14/2016

-New Feature: Support Advanced Custom Fields PRO plugin.
-New Feature: Support ACF repeater fields.
-New Feature: Support WPML plugin.

Version 4.4 – 08/13/2016

-Bug fix: minor bugs fixed

Version 4.3 – 01/24/2016

-Bug fix: fix an issue in categories service

Version 4.2 – 01/09/2016

-New Feature: filters on SQL queries to edit them before execution
-New Feature: one click auto update system
-Bug fix: minor bugs fixed

Version 4.1 – 10/12/2015

-Bug fix: minor bugs fixed

Version 4.0 – 08/11/2015

-New Feature: Improve `getposts` service to make custom search using any post table columns
-New Feature: Improve `getposts` service to search in post meta values
-New Feature: Order `getposts` service with any column in the post table or postmeta table
-New Feature: Add Wordpress filters for services getComments, getposts, authors and categories
-Bug fix: Fix minor bugs

Version 3.9 – 06/01/2015

-Improvement: New authentication log-in page for OAuth authentication to protect your content from stealing
-Improvement: Special permissions for every OAuth client ID
-Improvement: API usage limit for every OAuth access token

Version 3.8 – 02/12/2015

-Improvement: Support reading 'Advanced custom fields' in categories and taxonomies services
-Bug Fix: Fix bug in social log-in service

Version 3.7 – 12/22/2014

-New Service: Update user profile
-New Feature: New complex authentication level for the premium content

Version 3.6 – 10/15/2014

-New Service: Update or edit a post
-New Service: Update or edit a comment
-Improvement: SQL custom service returns now the QUERY error if it happened
-Bug Fix: Fix a bug in `get_comments` service
-Bug Fix: Fix a bug when add a new custom service or edit
-Bug Fix: Minor bug fixes

Version 3.5 – 08/09/2014

- Minor bugs fixed

Version 3.4 – 06/02/2014

-Improvement: Support RTL style
-Improvement: Improve custom service builder to execute PHP code

Version 3.3 – 05/12/2014

-Bug Fix: Fix error in `get_posts_archive` service
-Improvement: Support Geolocation services

Version 3.2 – 03/08/2014

-Improvement: Support add new post with custom field and custom meta
-Improvement: Support add new post in draft, published or any status
-Improvement: Make category ID isn't required in `getposts` service
-Improvement: Support filter `getposts` by post status
-New Service: Change user password
-New Service: Change the post status
-New Service: Change the comment status
-New Service: Delete user permanently
-New Service: Delete post permanently
-New Service: Delete comment permanently
-New Service: Change user profile image
-Improvement: Support add/upload profile image in `signup` service
-Improvement: Support filter `getComments` by comment status
-Improvement: Support add new comment with custom meta
-Improvement: Support signup user with custom field and custom meta
-Bug Fix: Fix compatibility with PHP version 5.2
-Bug Fix: Fix bug when try to build new custom service

Version 3.1 – 02/24/2014

-New Feature: Support Wordpress multisite
-New Feature: Support JSONP output
-New Service: Add new service to display the network sites
-Bug Fix: Fix error in user roles when signup new user
-Bug Fix: Fix error in "Registeration Status" option
-Improvement: Accept uploading image in new post service and set as the post featured image
-Improvement: Display posts services support now filtering by custom taxonomies and custom meta values
-Improvement: Add post service supports now add with custom taxonomies
-Improvement: Strong improve in search service
-New Feature: Notify when exists new update for the plugin

Version 3.0 – 01/28/2014

-New Feature: Client system management
-New Feature: OAuth 2.0 authorization system
-New Feature: Engine control to easy control in the API services
-New Feature: Visual statistics for API usage
-New Feature: Maintenance mode: Open/Close API with a customised message
-New Option: Determine a max limit for the result data per page
-Improvement: Isolate the push notification system to a new plugin
-Improvement: Build custom service UI improvements
-Improvement: Create custom options UI improvements
-Improvement: Code samples in the documentation page
-New Service: Logout and destroy user sessions
-Bug Fix: Minor bug fixes

Version 2.0 – 01/07/2014

-Improvement: Support custom taxonomies
-Improvement: Support custom post types
-Improvement: Support custom fields
-Improvement: Support meta boxes
-New Feature: Push notification channels
-New Feature: Upload media files
-New Feature: Build custom services
-New Feature: create custom options
-Improvement: Set featured post image when publish new post
-Improvement: Support post formats
-Bug Fix: Fix the post featured image URL

Version 1.0 – 12/28/2013

Version 1.0 beta – 09/01/2011

by
by
by
by
by
by