开创性的API
varsom-landslide-client的Python项目详细描述
瓦索姆滑坡客户
未提供描述(由Swagger Codegenhttps://github.com/swagger-api/swagger-codegen生成)
此Python包由Swagger Codegen项目自动生成:
- API版本:v1.0.6
- 包版本:1.0.0
- 生成包:io.swagger.codegen.v3版。generators.python.PythonClientCodegen在
要求
Python 2.7和3.4+
安装和使用
pip安装
如果python包托管在Github上,则可以直接从Github安装
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(您可能需要使用根权限运行pip
:sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
然后导入包:
^{pr2}$设置工具
通过Setuptools安装。在
python setup.py install --user
(或sudo python setup.py install
为所有用户安装软件包)
然后导入包:
importvarsom_landslide_client
入门
请按照installation procedure操作,然后运行以下命令:
from__future__importprint_functionimporttimeimportvarsom_landslide_clientfromvarsom_landslide_client.restimportApiExceptionfrompprintimportpprint# create an instance of the API classapi_instance=varsom_landslide_client.CapApi(varsom_landslide_client.ApiClient(configuration))startdate='2013-10-20T19:20:30+01:00'# datetime | enddate='2013-10-20T19:20:30+01:00'# datetime | try:api_response=api_instance.cap_feed(startdate,enddate)pprint(api_response)exceptApiExceptionase:print("Exception when calling CapApi->cap_feed: %s\n"%e)# create an instance of the API classapi_instance=varsom_landslide_client.CapApi(varsom_landslide_client.ApiClient(configuration))id='id_example'# str | try:api_response=api_instance.cap_id(id)pprint(api_response)exceptApiExceptionase:print("Exception when calling CapApi->cap_id: %s\n"%e)
API终结点文档
所有uri都是相对于https://api01.nve.no/hydrology/forecast/landslide/v1.0.6
Class | Method | HTTP request | Description |
---|---|---|---|
CapApi | cap_feed | GET /api/Cap/Feed/{startdate}/{enddate} | |
CapApi | cap_id | GET /api/Cap/Id/{id} | |
RegionApi | region_get | GET /api/Region/{countyId} | |
WarningApi | warning_all | GET /api/Warning/All/{langkey}/{startdate}/{enddate} | |
WarningApi | warning_county | GET /api/Warning/County/{county}/{langkey}/{startdate}/{enddate} | |
WarningApi | warning_get | GET /api/Warning/{langkey}/{startdate}/{enddate} | |
WarningApi | warning_municipality | GET /api/Warning/Municipality/{municipality}/{langkey}/{startdate}/{enddate} |
模型文档
- Alert
- AlertInfo
- AlertInfoArea
- AlertInfoAreaGeocode
- AlertInfoEventCode
- AlertInfoParameter
- AlertInfoResource
- Cause
- CodePageDataItem
- County
- DecoderFallback
- EncoderFallback
- Encoding
- FormattedContentResultAlert
- FormattedContentResultListAlert
- IRequiredMemberSelector
- MediaTypeFormatter
- MediaTypeHeaderValue
- MediaTypeMapping
- MicroBlogPost
- Municipality
- NameValueHeaderValue
- Station
- Warning
授权文件
所有终结点都不需要授权。在
作者
- 项目
标签: