GithubHelp home page GithubHelp logo

mjavadhpour / pzz-api-client Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 3.0 110 KB

Simple REST APIs for WordPress

Home Page: https://wordpress.org/plugins/pzz-api-client/

License: GNU General Public License v2.0

PHP 100.00%
api php restful-api wordpress wordpress-plugin

pzz-api-client's Introduction

pzz-api-client's People

Contributors

masthisis avatar mjavadhpour avatar thisismzm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pzz-api-client's Issues

[FEAT] JWT authentication

Add JWT authentication capability to plugin.

Features:

  • Ability to find user by requested token.
  • Token is not required and if it sent by clients, then we should be able to pass user to handler functions.
  • Check if we need new column in user table or not. The JWT token is self contained.

[FIX] Plugin readme

  • Update brief description:
Provides a set of RESTful APIs, developed specifically for Mobile clients that want to connect to your WordPress website.
  • Update description:
PZZ API Client provides a set of RESTful APIs, developed specifically for Mobile clients to connect to your WordPress website. 

This plugin support some specific APIs such as posts, taxonomies, comments. We plan to support more APIs (eg. WooCommerce).

It is possible to authenticate a user using any of the following WP REST API authentication methods such as:
-  JWT Authentication for WP REST API
  • Minimum WordPress support:
4.2
  • WooCommerce:

    • According to this link.
  • Authors:

    • thisismzm
    • masthisis

[FIX] Woo commerce was not installed

When Woo-commerce is not installed, we should not include Woo-commerce feature classes and APIs.

Example:

In class-pzz-api-client.php

require_once plugin_dir_path(dirname(__FILE__)) . 'includes/lib/woocommerce/extends/api/class-pzz-wc-api-server.php';
require_once plugin_dir_path(dirname(__FILE__)) . 'includes/lib/woocommerce/extends/api/class-pzz-wc-api-resource.php';
require_once plugin_dir_path(dirname(__FILE__)) . 'includes/lib/woocommerce/extends/api/class-pzz-wc-api-orders.php';

or

class-pzz-api-client.php

/**
* Woocommerce related routes
* @since    1.2.0
*/
$wc_core = new PZZ_WC_API_Controller('pzz/wc', $this->get_api_version('wc'));

$routes[] = [
    'method' => 'GET',
    'handler' => $wc_core,
    'path' => 'orders',
    'callback' => 'get_current_user_orders',
    'args' => function () {
        return [];
    },
    'is_secure' => true
];

should not be included.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.