Download the PHP package picamator/neo-ws-client without Composer

On this page you can find all versions of the php package picamator/neo-ws-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 neo-ws-client

NeoWsClient

PHP 7 ready Latest Stable Version License SensioLabsInsight

Master

Build Status Coverage Status

Dev

Build Status Coverage Status

NeoWsClient - client for NASA Open Api "Near Earth Object Web Service" or NeoWs in short. All NeoWs data is from the NASA JPL Asteroid team.

NeoWsClient supports NeoWs v1 with resources:

Requirements

Installation

Update to your composer.json with:

Examples

To run examples please create parameters.yml in config directory using as a template parameters.yml.dist. The DEMO_KEY is a valid api token. It has limitation as requests per hour, per day. More information in NASA official documentation.

Example list:

Arbitrary precision math

NeoWsClient formats only Date to DateTime object all others keeps original API's. NeoWs uses string for long precision float like e.g. .6304873017364636 execution floatval on them would removes last two digits. Therefore NeoWsClient does not convert strings to int or float. To make any math with string floats please use BCMath. BCMath takes care of arbitrary precision mathematics.

Technical specification

That section describes extension and configuration points.

Dependency injection

NeoWsClient uses Symfony DI. It's configuration in services.yml.

Data mapping

NeoWsClient works with data mapping to create objects based on Api response. To make customization or build objects from API response it's need to create mapper repository object. Mapper repository object is a simple data storage over schema with implementation Mapper\Api\RespositoryInterface.

The schema contains:

Name Is required Description
source yes Key in API response
destination yes Property inside NeoWsClient value object
destinationContainer yes Name of NeoWsClient object where destination property is located
schema no Sub schema
collectionOf no Interface name of NeoWsClient objects that will be present inside collection. It's an interface of destinationContainer in sub-schema.
filter no Name of NeoWsClient filter object, it runs over API's data

Errors

There are three different error types:

Response HTTP codes: 401, 403, 404

In case of getting HTTP codes: 401, 403, 404 or any unsuccessful one application return empty response. Empty response means valid Response object where:

Response HTTP code 200 with empty body

If API returns empty body with HTTP code 200 with several simultaneously requests. The NeoWsClient Manager rise exception ManagerException in that case. Because HTTP code 200 means OK, but body is wrong therefore NeoWsClient can not distinguish valid/invalid data by HTTP code.

That exception SHOULD be catch without putting any logic like resend, wait 3 sec. then resend again etc. Instead it's better to have cache over API.

Exception

The full exception list that NeoWsClient rises is in Exception folder. If exception rise it means that application can not proceed request, it does not have any business logic in it.

Documentation

Developing

To configure developing environment please:

  1. Follow Docker installation steps
  2. Run inside Docker container composer install

Contribution

If you find this project worth to use please add a star. Follow changes to see all activities. And if you see room for improvement, proposals please feel free to create an issue or send pull request. Here is a great guide to start contributing.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project and its community you agree to abide by those terms.

License

NeoWsClient is licensed under the MIT License. Please see the LICENSE file for details.


All versions of neo-ws-client with dependencies

PHP Build Version
Package Version
Requires php Version ~5.6|~7.0
psr/http-message Version ~1.0
guzzlehttp/guzzle Version ~6.2
symfony/dependency-injection Version ~2.8 || ~3.1
symfony/proxy-manager-bridge Version ~2.8 || ~3.1
symfony/config Version ~2.8 || ~3.1
symfony/yaml Version ~2.8 || ~3.1
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 picamator/neo-ws-client contains the following files

Loading the files please wait ....