Download the PHP package cradlephp/cradle-api without Composer

On this page you can find all versions of the php package cradlephp/cradle-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 cradle-api

cradle-api

A developer management and API generator that includes management for the following.

Install

If you already installed Cradle, you may not need to install this because it should be already included.

How to Use

By default the cradle-api package tables will be empty. You can use this SQL script to manually populate it.

api.sql

So when you populate the API schemas a new section /developer/app/search will be available. This is like facebook developer portal (but more raw). It also auto creates docs /developer/docs/scopes and /developer/docs/webhooks.

REST

There's 3 kinds of rest calls:

You can expect this is following OAuth v2 specs (as well as Facebook's REST style) very closely. The following screenshot shows what the form fields are for in /admin/system/model/rest/create.

image

Paths in REST calls can also take route parameters like /profile/detail/:profile_id that will also be apart of the event call parameters.

Web Hooks

Then web hooks are like Github's web hooks.

image

When you create a web hook it will then be available to the application to utilize. But beware the web hook url given should be valid, or else every time you create a profile, it will be slow (because it's trying to call that web hook url).

image

This way allows to create APIs without needing to program. but, you can also program in your own REST calls and webhooks manually in any controller.php. We are not stopping you from doing that.

OAuth v2

In /developer/app/search you can also try the 3-legged OAuth yourself.

image

This will redirect you to /dialog/request?client_id=94341e9d0776b73cc7142cc161faf0e688fdbfb2. You can use this same URL to authenticate via 3-Legged OAuth. For now, just click Allow.

image

When your done that it will return you back to the same screen with the same URL except with a code parameter. (ie. /developer/app/search?code=1234567890). If you have POST MAN you can call POST /rest/access?client_id=[your app key]&client_secret=[your app secret]&code=[the code you got earlier]. That will return session tokens in JSON as in the following.


Contributing to Cradle PHP

Thank you for considering to contribute to Cradle PHP.

Please DO NOT create issues in this repository. The official issue tracker is located @ https://github.com/CradlePHP/cradle/issues . Any issues created here will most likely be ignored.

Please be aware that master branch contains all edge releases of the current version. Please check the version you are working with and find the corresponding branch. For example v1.1.1 can be in the 1.1 branch.

Bug fixes will be reviewed as soon as possible. Minor features will also be considered, but give me time to review it and get back to you. Major features will only be considered on the master branch.

  1. Fork the Repository.
  2. Fire up your local terminal and switch to the version you would like to contribute to.
  3. Make your changes.
  4. Always make sure to sign-off (-s) on all commits made (git commit -s -m "Commit message")

Making pull requests

  1. Please ensure to run phpunit and phpcs before making a pull request.
  2. Push your code to your remote forked version.
  3. Go back to your forked version on GitHub and submit a pull request.
  4. All pull requests will be passed to Travis CI to be tested. Also note that Coveralls is also used to analyze the coverage of your contribution.

All versions of cradle-api with dependencies

PHP Build Version
Package Version
Requires cradlephp/cradle-profile Version ~2.3.0
cradlephp/cradle-queue Version ~2.3.0
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 cradlephp/cradle-api contains the following files

Loading the files please wait ....