Download the PHP package it-bens/deqar-api-client without Composer

On this page you can find all versions of the php package it-bens/deqar-api-client. 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 deqar-api-client

DEQAR API Client(s)

Maintenance Status CI Status codecov

What is DEQAR?

DEQAR is the database of EQAR, the European Quality Assurance Register for Higher Education. It provides information about european institutions for higher education, the quality assurance agencies, their reports and their work.

The information can be retrieved from the DEQAR REST APIs:

There is also an API, which can be used to submit quality assurance reports:

How to install this package?

The package can be installed via Composer:

It requires at least PHP 8. It was tests against PHP 8.1.

Which API Client provides this package?

This package contains clients for the WebAPI and the SubmissionAPI.

The WebApi provides endpoints for agencies, countries, institutions and reports. There is always an endpoint for retrieving a collection of resources and one or more for retrieving more detailed resources. Currently, this client uses mostly the collection endpoints and provides methods for filtering them to retrieve a single less-detailed resource by unique identifiers.

There is also a cached implementation of the WebApi client. It decorates the ordinary WebApi client.

The submission API implements only two endpoints: submit/update a report and delete a report. The submission process involves several server-sided checks of the provided data. Some checks are performed immediately, which results in an error response if the data is invalid. Other checks are done asynchronously, which means that reports can be marked as invalid after a successful submission.

How to use the Client?

The Web API Client

The WebApiClientInterface implementations provide a static create method, that takes the minimal amount of required data and creates components like HTTP client and serializer by themselves.

The CachedWebApiClient decorates a WebApiClientInterface implementation.

The following methods are provided by the WebApiClientInterface:

The responses are mapped to DTOs via Symfony Serializer. The methods for retrieving a single less-detailed version of a resource, rely on filtering the collection responses. To prevent unnecessary DEQAR API hits, please use the CachedWebApiClient. The client caches its results for 1 day (86400 seconds).

Internally, the Symfony HttpClientInterface is used for requests. With the static create method of the WebApiClient, an instance with the Symfony HttpClient and Symfony Serializer (with the necessary normalizers and extractors) is created. However, the constructor is public and can be used to pass custom instances of the HttpClientInterface and the SerializerInterface.

The Submission API Client

The SubmissionApiClientInterface implementations provide a static create method, that takes the minimal amount of required data and creates components like HTTP client, validator and serializer by themselves.

⚠ The test parameter is important to use the DEQAR sandbox in a development or test environment. Currently, the DEQAR credentials are valid for the sandbox and the production environment. Without the test parameter, the SubmissionApiClient will send data to the public version of DEQAR!

To prevent sending invalid, data the inputs are validated against several constraints within this client. The data have to be provided as a SubmitReportRequest object, which is validated with the Symfony Validator.

The following constraints are applied to the SubmitReportRequest:

The sub-objects of the request are validated too:

To allow the report updating, a report_id can be provided.

The submitReport and the deleteReport methods return response objects. They contain a flag, that indicates if the request was successful and the returned data. The data contains important information about server-side constraints that were violated.

What packages can be used with together with this one?

Currently, two packages are planned:

How to test the package?

The package provides PHPUnit tests for both API clients. In a local environment the tests and static code analysis can be executed via docker.

The PHPUnit tests and a static code analysis via PHPStan are also executed via GitHub actions on any push or PR. The GitHub Actions CI runs with all supported PHP versions and all supported Symfony versions.

Contributing

I am really happy that the software developer community loves Open Source, like I do! ♥

That's why I appreciate every issue that is opened (preferably constructive) and every pull request that provides other or even better code to this package.

You are all breathtaking!

Special Thanks

This project is financed by the European Quality Assurance Register (EQAR) and the European Union, which I am very thankful for!


All versions of deqar-api-client with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-intl Version *
symfony/cache Version ^5.4|^6.0
symfony/cache-contracts Version ^2.5
symfony/http-client Version ^5.4|^6.0
symfony/intl Version ^5.4|^6.0
symfony/property-access Version ^5.4|^6.0
symfony/serializer Version ^5.4|^6.0
symfony/string Version ^5.4|^6.0
symfony/validator Version ^5.4|^6.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 it-bens/deqar-api-client contains the following files

Loading the files please wait ....