Code Monkey home page Code Monkey logo

cakephp-api-utils's Introduction

API Utils

WizeHive's REST API is built on top of CakePHP 2.x. During its development, there were many crucial decisions that needed to be made and code that needed to be written to support a complex API that would be truly usable with room to grow.

This repository is a demo API. It contains a directory of plugins which power most of it. While these plugins can theoretically be used separately in other apps, it is highly recommended that they be used as a bundle in a new app. In other words, this code is best used as a framework for an entirely new REST API project.

In the future, we will strive to provide detailed documentation for all of the complex functionality available in these plugins.

For now, the best way to get started is to set up the demo, experience it firsthand, and explore the code behind it.

Hello World:

  1. Download/clone this repository
  2. Import the SQL in /path/to/cakephp-api-utils/app/Config/Schema/demo.sql to a database named demo_api. If you need to change any database configurations, do so in /path/to/cakephp-api-utils/app/Config/database.php
  3. Set up the following virtual hosts:
  • api-demo.dev -> /path/to/cakephp-api-utils/app
  • auth.api-demo.dev -> /path/to/cakephp-api-utils/app
  • client.api-demo.dev -> /path/to/cakephp-api-utils/oauth2-sample
  1. Configure your hosts file to point these locations to your localhost
  2. Go to http://client.api-demo.dev in your browser
  3. Click login. Sign up for your first account, then login with it.
  4. You should be presented with an access token. Copy this.
  5. Using this access token, make POST, GET, PUT and DELETE requests to your API. For example:
  1. That's it! You have a running API. Explore it, bring the plugins into your own app, customize to suit.

cakephp-api-utils's People

Contributors

anthonyp avatar savah avatar

Watchers

 avatar

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.