mailoman / nasa-neows-client
0.0.1
2017-07-13 11:30 UTC
Requires
- php: >=5.4
- ext-curl: *
- ext-json: *
- ext-mbstring: *
Requires (Dev)
- phpunit/phpunit: ~4.8
- satooshi/php-coveralls: ~1.0
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-09-26 04:14:17 UTC
README
未提供描述(由Swagger Codegen生成 https://github.com/swagger-api/swagger-codegen)
此PHP包由Swagger Codegen项目自动生成
- API版本:1.0
- 包版本:0.0.1
- 构建日期:2017-07-13T18:16:24.970+07:00
- 构建包:class io.swagger.codegen.languages.PhpClientCodegen
需求
PHP 5.4.0及更高版本
安装与使用
Composer
要通过Composer安装绑定,请将以下内容添加到composer.json
{
"repositories": [
{
"type": "git",
"url": "https://github.com/mailoman/nasa-neows-client.git"
}
],
"require": {
"mailoman/nasa-neows-client": "*@dev"
}
}
然后运行composer install
手动安装
下载文件并包含autoload.php
require_once('/path/to/GeneratedNASANeoWsClient/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit lib/Tests
入门指南
请按照安装过程进行操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: APIKeyQueryParam NASA\NeoWs\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // NASA\NeoWs\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); $api_instance = new NASA\NeoWs\Api\DefaultApi(); $page = 0; // int | page $size = 20; // int | size try { $result = $api_instance->browseNearEarthObjects($page, $size); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->browseNearEarthObjects: ', $e->getMessage(), PHP_EOL; } ?>
API端点文档
所有URI都是相对于https://api.nasa.gov/neo/
模型文档
- CloseApproachData
- EstimatedDiameter
- EstimatedDiameterContainer
- HashmapStringListNearearthobject_
- Link
- MissDistance
- NearEarthObject
- NearEarthObjectList
- OrbitalData
- RelativeVelocity
- Statistics
- URL
授权文档
APIKeyQueryParam
- 类型:API密钥
- API密钥参数名:api_key
- 位置:URL查询字符串