Consuming API REST – WordPress Plugin

Overview

Description

Consuming rest plugin is for consuming and manipulated responses of api’s json, you only need  routes from your api, select method (post, get, put, delete) to get response from your api.

Features

  • One only and easy shortcode.
  • Multiple request (GET,POST,PUT,DELETE).
  • Manipulate responses on your functions js.

Included

  • Included sample data to start immediately.

Requirements

  • Worpress 4.0 +

Instructions

* install plugin normally

* on menu rest consume input your webservice data

* on menu routes input your routes to webservice actions,

* input one alias for route (how call webservice action) and 

* input the method of route

* This plugin need curl active

* create a form whit id=”form” or other id use the shortcode for testing aplication:

* [consuming_rest alias=”user_log” id_form=”login-frm” success=”console.log” variable=”response” response=”true” response_error=”404″ on_error=”console.log”]

* alias: alias of route.

* id_form: the form id, default is “form” (no necessary if you use id=”form”)

* variable: json name of response usually {response: true, data: …}

* response: response of variable to consider success (not succes ajax)

* response_error: response of variable to consider error {response: false}

* success: if variable response it’s equals to response of shortcode or send are success(you no need response and variable to exec success) in success input js action

* on_error: if send information don’t work or response it’s equals to resonse_error of shortcode input js action

* autorun: true or false (noo need) if you need execute automatically (no submit) the consume.

* before: one action js execute before send data.

* more info in plugin -> info menu

* enjoy

Related