Download the PHP package reset-button/a-parser-php-client without Composer

On this page you can find all versions of the php package reset-button/a-parser-php-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 a-parser-php-client

A-Aparser PHP API

This A-parser PHP API library provides convenient access to the A-Parser HTTP API.

Requirements

Installation

Quickstart

Usage

Basic Action Usage

Define an A-parser instance, passing full URL to API endpoint and password

Instantiate an action using the appropriate action class, as outlined in the official documentation

Run the action by calling runAction method

Using Parser class in Actions

All actions that accept parser name and config as parameter, accept a Parser instance instead (addTask, oneRequest, bulkRequest, getParserPreset, getParserInfo)

Parser class contains all logic, related to used parser in API methods, that used it

In minimal approach you need only to create Parser instance without any configuration and pass it to corresponding method

You can configure parser with options, overrides, etc before passing it to action by calling corresponding methods

Or you can set full configuration at once using a corresponding method, this is useful when copy pasting from API request

Note, that parser configuration has no effect in getParserPreset and getParserInfo actions.

Configuring Actions

All action required parameters are configured via constructor, and optional are set using builder pattern with corresponding parameters from the documentations with "set" prefix, for example

Configuring addTask action

This method is differs from others methods, it can be instantiated via passing at least one parser or passing a previously saved preset, this two methods are implemented via named constructor

Also, addTask action is a most complex action in API, so many setters for are not implemented and you should use setDataValue from Action Direct Methods to set parameters

Setting queries source

You should pass queries when creating action, no matter the source. And then change queries source using setQueriesFrom... methods, default behavior is from text.

Action Direct Methods

You can read any configuration option using getDataValue helper, if this option is not exists - null will returned

You can directly set/overwrite any configuration option using setDataValue helper. Use with caution.

You can get all full configuration options using getData helper.

Aparser methods

Instantiate A-parser instance by passing URL to API endpoint and password

Prepare actions and run it by calling runAction method runActionwill returndatasection from A-parser success response payload or throw aAparserApiException` if A-parser responds with error

You can get JSON string from passed action using getJsonString helper.

At last, you can just copy JSON query from A-parser and send it via API directly even ignoring previously passed password

License

This package is open-sourced software licensed under the MIT license.


All versions of a-parser-php-client with dependencies

PHP Build Version
Package Version
No informations.
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 reset-button/a-parser-php-client contains the following files

Loading the files please wait ....