Download the PHP package davesweb/bricklink-api without Composer

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

Bricklink API

A PHP SDK for the Bricklink API. This package provides an easy way to authenticate with the Bricklink API, so you can run requests directly against the Bricklink API. This package also provides some repositories for easier and object-oriented communication with the Bricklink API.

Installation

composer require davesweb/bricklink-api

Usage

The following examples are just the basic usage of how to set up this package. Please read the complete documentation for more detailed and advanced examples of how to use this package and how to extend this package.

Authentication

First, create a config object with your secrets and tokens you got from Bricklink.

Optionally you may pass the API URL as a fifth parameter in case this ever changes, but by default this is set correctly.

Next create a Bricklink Gateway object with the config you just made.

You can now call the request() method on the gateway object to make direct requests to your shop. However you can also use the repositories for easier data manipulation.

Repositories

This package provides a set of repositories that mimic the API structure of Bricklink. There are 14 repositories you can use:

Each repository requires a Gateway object to connect to Bricklink, and a Transformer object to transform the raw data into value objects. Some repositories may require multiple transformers because they transform multiple things, like the OrderRepository. A simple example is:

Documentation

Please read the documentation for more detailed and advanced examples of how to use this package.

Docker

This package contains a Docker setup te easily run the tests and CS fixer.

To build the docker image, copy the docker compose file:

cp docker-compose.yml.dist docker-compose.yml

Then run:

docker-compose build

To start the container, run:

docker-compose up -d

Logging in to the docker container:

docker-compose exec app bash

Tests

To run the test suite, run composer test from inside the docker container, or docker-compose exec app composer test from outside the docker container. Tests are created using PHPUnit, so you may use PHPUnit and it's options directly to run the tests.

Code style

This project uses CS Fixer to enforce a unified code style. The configuration for this can be found in the .php-cs-fixer.php file.

To run CS fixer on the entire project, run composer cs-fixer from inside the container, or docker-compose exec app composer cs-fixer from outside the docker container. You can also run CS fixer directly (php vendor/bin/php-cs-fixer fix) and add your custom arguments. Keep in mind that the contributing guide requires you to run CS Fixer with the configuration in this package.

License

This package is licensed under the MIT license, which basically means you can do whatever your want with this package. However, if you found this package useful, please consider buying me a beer or subscribing to premium email support over on Patreon, it's really appreciated!


All versions of bricklink-api with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
guzzlehttp/guzzle Version ^7.3
guzzlehttp/oauth-subscriber Version ^0.6.0
jawira/case-converter Version ^3.4
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 davesweb/bricklink-api contains the following files

Loading the files please wait ....