Download the PHP package terminal42/rokka-io-api-platform-bridge without Composer

On this page you can find all versions of the php package terminal42/rokka-io-api-platform-bridge. 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 rokka-io-api-platform-bridge

rokka.io - ApiPlatform Bridge

Seamlessly integrates your rokka.io account with ApiPlatform.

Why?

Why would you bridge an API that is already an API? These are the main reasons:

It works by simply bridging all the requests you make to your API to rokka.io by using the same path and enhancing it with the authorization header for rokka.io. By default it does that using the /rokka bridge endpoint but this can be configured.

Example: Let's say you want to create a new source image. In rokka.io that would be a POST request to /sourceimages/{organization}. So instead of sending a POST request to https://api.rokka.io/sourceimages/{organization} you would send a POST request to https://myapi.com/rokka/sourceimages/{organization}.

Because you never want to expose the whole API for rokka.io (otherwise one could also modify your account), the allowed endpoints have to be configured (see Configuration section). Thus you can bridge any endpoint you like. The cool thing with this concept is that if you wanted to allow some users to modify your account, you can enable this endpoint and protect it using your authentication mechanisms very easily.

Also, you can omit the whole {organization} part by configuring a default_organization, it will automatically use this one whenever you request anything.

Installation

  1. Use Composer and run

    Important: This bundle uses HTTPlug to decouple from any specific HTTP client. This means that if you already use one of the available clients, it will simply re-use this one. If you haven't got any client yet, you have to choose one and install these first (or at the same time). E.g. if you want to use Guzzle, install the bundle like so:

  2. Configure the rokka.io Symfony Bundle as documented in their docs.
  3. Load the bundle in your kernel which is done automatically if you use Symfony Flex, otherwise use

  4. Add the route loader of this bundle to your routing configuration:

  5. Configure this bundle as shown in the Configuration section.

Configuration

Custom Http Client

You can pass a service id via rokka_api_platform_bridge.http_client which must be an instance of the PSR Http\Client\HttpClient. Thanks to this you can create your own instance that implements logging etc. or even reuse existing Symfony bundles such as the very popular eightpoints/guzzle-bundle. You only need to wrap the Guzzle client with the PSR compatible adapter you get using php-http/guzzle6-adapter. You can then configure the Guzzle service like so:

Roadmap / Ideas


All versions of rokka-io-api-platform-bridge with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1 || ^8.0
ext-json Version *
api-platform/core Version ^2.3
symfony/config Version ^4.4 || ^5.4 || ^6.0
symfony/dependency-injection Version ^4.4 || ^5.4 || ^6.0
php-http/client-implementation Version ^1.0
php-http/discovery Version ^1.0
psr/http-message Version ^1.0
php-http/message-factory Version ^1.0
symfony/routing Version ^4.4 || ^5.4 || ^6.0
symfony/psr-http-message-bridge Version ^2.0
guzzlehttp/psr7 Version ^2.4
nyholm/psr7 Version ^1.5
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 terminal42/rokka-io-api-platform-bridge contains the following files

Loading the files please wait ....