Download the PHP package k7brasil/codeigniter3-api without Composer

On this page you can find all versions of the php package k7brasil/codeigniter3-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package codeigniter3-api

CodeIgniter API Controller v.1.1.8

This extension is powered by K Seven.

Files

API Documentation

Token Documentation

Change Log

Installation

You can install this project into your PC using [composer]().

The recommended way to install composer packages is:

Postman (Test)

chrome web store ou Install In PC (Recommended)

Requirements

  1. PHP 5.4 or greater
  2. CodeIgniter 3.0+

Note: The library is used in CodeIgniter v3.8 and PHP 5.6.8.

Simple API

Documentation

Setup API Request Methods


Use API Limit

Before using the limit in API, we need to load the codeigniter database library. You can also load the database library in the autoload config config/autoload.php file.

After database library loaded, database must be set in database config file config/database.php.

After creating and setting up a database, we need to create a table for API Limit [api_limit] in the database. like this.

The name of the database table of api limit is api_limit by default. Which we can change through the API configuration file [config/api.php]. like this.

Now we can use API Limit Method.

Thus this API can be run only 10 times in 5 minutes. It on IP address.

At API limit time argument we can also use everyday which will follow the api limit per day. On the same API address


Use API Key without Database

We can set the API key in the Request Header. by default, the name of the header is X-API-K, which we can change in the API config file [config/api.php]. like this

Use this code in your API Controller file.


Use API Key with Database

We can also check the API key by databases. For this, we need to first create api_keys table in MySQL. like this

The name of the database table of API Keys is api_keys by default. Which we can change through the API configuration file [config/api.php]. like this.

Set API keys in api_keys database table And Use this code in your API Controller file.


Use Custom Function in API Key


Add Custom Data in API Responses

In response to the API, we can also add custom data to something like this.

API Output ::


API Return Data

This method is used to return data to api in which the response data is first and the second request status code.

Request Status Code List

Status Code Status Text
200 OK
401 UNAUTHORIZED
404 NOT FOUND
408 Request Timeout
400 BAD REQUEST
405 Method Not Allowed

Using the Config file in the API key

  1. Create config file \application\config\api_keys.php
  2. Use in API Controller like this

Reporting Issues

If you have a problem with this plugin or found any bug, please open an issue on GitHub.

License

CodeIgniter API Controller is licensed under MIT


All versions of codeigniter3-api with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package k7brasil/codeigniter3-api contains the following files

Loading the files please wait ....