Recommend this page to a friend! |
Classes of Sergii Pryz | NASA Near Earth Orbit API Client | README.md | Download |
|
DownloadNeoWsClientMasterDevNeoWsClient - 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:
RequirementsInstallationUpdate to your
ExamplesTo run examples please create Example list:
Arbitrary precision mathNeoWsClient formats only Date to DateTime object all others keeps original API's.
NeoWs uses string for long precision float like e.g. Technical specificationThat section describes extension and configuration points. Dependency injectionNeoWsClient uses Symfony DI. It's configuration in services.yml. Data mappingNeoWsClient 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 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 ErrorsThere are three different error types:
Response HTTP codes: 401, 403, 404In case of getting HTTP codes: 401, 403, 404 or any unsuccessful one application return empty response.
Empty response means valid
Response HTTP code 200 with empty bodyIf API returns empty body with HTTP code 200 with several simultaneously requests. The NeoWsClient Manager rise exception 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. ExceptionThe 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
DevelopingTo configure developing environment please:
ContributionIf 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. LicenseNeoWsClient is licensed under the MIT License. Please see the LICENSE file for details. |