Download the PHP package networkrailbusinesssystems/bravo-api without Composer

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

Bravo API

A Laravel package to send and retrieve data from Bravo using the Bravo rest API.

Contents

About

Config

You can publish the configuration if required:

php artisan vendor:publish --provider="NetworkRailBusinessSystems\BravoApi\BravoApiServiceProvider"

You will need to set the following in your .env file as a minimum:

The base url is in the following format https://<WEBSERVICES-URL>/esop/jint/api/public/. For example https://customername.com/esop/jint/api/public/. The api package is designed to work with v1 of the Bravo API.

If you want to alter the default token cache time (10 minutes by default), then, for example, set the following to 20 minutes:

Key Type Default
BRAVO_API_USERNAME string null
BRAVO_API_PASSWORD string null
BRAVO_API_GRANT_TYPE string client_credentials
BRAVO_API_BASE_URL string null
BRAVO_API_TOKEN_CACHE integer 10
BRAVO_API_PROXY_ADDRESS string null
BRAVO_API_TIMEOUT integer 10
BRAVO_API_RETRY_COUNT integer 3
BRAVO_API_RETRY_INTERVAL integer 5000

Proxy:

The HTTP Client requires a proxy to be able to connect with Bravo's API when the application is deployed on the servers.

This is already configured for you however, you must ensure that the APP_ENV property in the .env file is to either staging or production for it to be applied. It will not be applied when set to local or testing.

Create Project

By default, the projectOperation is 'CREATE_FROM_TEMPLATE'. This requires that the $project->tender->sourceTemplateCode or the $project->tender->sourceTemplateReferenceCode is set. The sourceTemplateCode is the tender_1234 style code and the sourceTemplateReferenceCode is the project_1234 style code.

To create a new project without creating from a template, set the fromTemplate argument in createProject() to false;

User Object

The User request object allows the Bravo username to be passed in to the login property, or you can use the Bravo id and name if they are known.

Category List

The category list allows you to set the category code and the category name when creating the Project. The category code needs to match the category code exactly in Bravo.

Workflow Type

The workflow type is an instance of a Spatie Enum and has set values of LOCKED, UNLOCKED or NONE.

A tender has a default workflow type of NONE.

Lot Type

The lot type is an instance of a Spatie Enum and has set values of SINGLELOTS or MULTILOTS.

A tender has a default workflow type of SINGLELOTS.

Update Project

To update a project, the tenderCode or tenderReferenceCode is required, otherwise a BravoApiException is thrown.

Search Projects

Pass in the search term, based on the FIQL query string. Use the FIQL Query package for a more human-readable way to construct the filter.

The response will contain a project list, which contains a collection of projects.

You can also pass in additional filters (deFilt and comp), as well as the startAt.

Get Project

Pass in the id for the project you wish to get.

Tests

Run composer install to install dependencies and then vendor/bin/phpunit to run the tests.

Development

Run npm install to install husky for the post commit git hooks.

The package uses prettier to format the php code layout on git commit.

The package has Larastan installed for static analysis, which has also been added as a lint-staged task. To run it manually, run ./vendor/bin/phpstan analyse


All versions of bravo-api with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
guzzlehttp/guzzle Version ^7.0.1
spatie/data-transfer-object Version ^3.0
spatie/enum Version ^3.9
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 networkrailbusinesssystems/bravo-api contains the following files

Loading the files please wait ....