2017 © Pedro Peláez
 

project yii2-basic-restful-api-template

Simple web api with Yii2 basic template

image

rockielin/yii2-basic-restful-api-template

Simple web api with Yii2 basic template

  • Sunday, July 17, 2016
  • by RockieLin
  • Repository
  • 1 Watchers
  • 0 Stars
  • 57 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 8 % Grown

The README.md

Yii2-basic-RESTful-API-template

Simple web api, (*1)

Basic web api using POST or GET method with json response, (*2)

Latest Stable Version Total Downloads, (*3)

INSTALLATION

You can choose to install the application using one of the following methods., (*4)

Install via Composer

If you do not have Composer, you may install it by following the instructions at getcomposer.org., (*5)

You can then install the application using the following command:, (*6)

php composer.phar global require "fxp/composer-asset-plugin:~1.1"
php composer.phar create-project --prefer-dist --stability=dev rockielin/yii2-basic-restful-api-template project-name

Enable debug:

create file "develop.me" in /config/, (*7)

Request:

all request using POST or GET method., (*8)

POST parameter validate using in controller:, (*9)

$this->checkParms(["parm1",
  "parm2",.....]);

Response:

success reqponse format:, (*10)

{"data":json object,"status":200}

error reqponse format:, (*11)

{"data":"message","status":status code}

example of error output:, (*12)

throw new \yii\web\HttpException(401, "authentication failed!");

The Versions

17/07 2016

dev-master

9999999-dev

Simple web api with Yii2 basic template

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Rockie Lin

framework yii2 advanced project template restful web api