本文簡要介紹 python 語言中 arcgis.realtime.velocity.feeds.RSS
的用法。
用法:
class arcgis.realtime.velocity.feeds.RSS(label, description, rss_url, http_auth_type, http_headers=<factory>, data_format=None, track_id_field=None, geometry=None, time=None, run_interval=RunInterval(cron_expression='0 * * ? * * *', timezone='America/Los_Angeles'))
可選參數:
- data_format:
[
RssFormat
,GeoRssFormat
]。包含此 feed 的數據格式配置的實例。僅配置允許的格式。如果在初始化期間未正確設置,則會自動檢測格式並根據傳入數據的樣本進行設置。該示例將從 init 中迄今為止提供的配置中獲取。 - track_id_field: String 。應設置為軌道 ID 的傳入數據的字段名稱。
- geometry:
[
XYZGeometry
,SingleFieldGeometry
]。幾何配置的實例,將用於從傳入數據創建幾何對象。 - time:
[
TimeInstant
,TimeInterval
]。時間配置實例,將用於根據傳入數據創建時間信息。 - run_interval:
RunInterval
。調度程序配置的實例。默認值為:RunInterval(cron_expression=``0 * * ? * * *``, timezone=”America/Los_Angeles”)
返回:
具有 RSS 提要配置的數據類。
輪詢 HTTP 端點以獲取 RSS 事件。該數據類可用於定義提要配置並創建提要。
Parameter
Description
label
String 。此 Feed 實例的唯一標簽。
description
String 。飼料說明。
rss_url
String 。提供數據的 HTTP 端點的地址。
http_auth_type
[
NoAuth
、BasicAuth
、CertificateAuth
]。包含 feed 實例的身份驗證信息的實例。http_headers
字典[str,str]。 Name-Value 字典,其中包含用於連接到 RSS 提要的 HTTP 標頭。
例子:
# Usage Example from arcgis.realtime.velocity.feeds import RSS from arcgis.realtime.velocity.http_authentication_type import ( NoAuth, BasicAuth, CertificateAuth, ) from arcgis.realtime.velocity.input.format import GeoRssFormat from arcgis.realtime.velocity.feeds.geometry import XYZGeometry, SingleFieldGeometry from arcgis.realtime.velocity.feeds.time import TimeInterval, TimeInstant from arcgis.realtime.velocity.feeds.run_interval import RunInterval name = "rss feed name" description = "rss feed description" url = "rss feed url" http_auth = NoAuth() # http_auth = BasicAuth(username="username", password="password") # http_auth = CertificateAuth(pfx_file_http_location="https://link", password="password") http_headers = { "Content-Type": "application/json" } # all properties can also be defined in the constructor as follows # Set data format data_format = GeoRssFormat() # Set geometry field geometry = XYZGeometry( x_field="category_longitude", y_field="category_latitude", wkid=4326, z_field="category_altitude", z_unit="Meters" ) # Set time field time = TimeInterval( interval_start_field="start_field", interval_end_field="end_field" ) # Set recurrence run_interval = RunInterval( cron_expression="0 * * ? * * *", timezone="America/Los_Angeles" ) # Configure the RSS Feed rss = RSS( label="feed_name", description="feed_description", rss_url=url, http_auth_type=http_auth, http_headers=http_headers, track_id_field="track_id", data_format=data_format, geometry=geometry, time=time, run_interval=run_interval ) # use velocity object to get the FeedsManager instance feeds = velocity.feeds # use the FeedsManager object to create a feed from this feed configuration RSS_feed = feeds.create(rss) RSS_feed.start() feeds.items
- data_format:
[
相關用法
- Python ArcGIS RunInterval用法及代碼示例
- Python ArcGIS ResourceManager.get用法及代碼示例
- Python ArcGIS Raster.remove_variables用法及代碼示例
- Python ArcGIS Raster.export_image用法及代碼示例
- Python ArcGIS Raster.get_dimension_values用法及代碼示例
- Python ArcGIS ResourceManager.add用法及代碼示例
- Python ArcGIS ReportManager.quick_report用法及代碼示例
- Python ArcGIS RealTimeAnalyticsManager.get用法及代碼示例
- Python ArcGIS Raster.get_dimension_attributes用法及代碼示例
- Python ArcGIS Raster.read用法及代碼示例
- Python ArcGIS Raster.append_slices用法及代碼示例
- Python ArcGIS RealTimeAnalytics.status用法及代碼示例
- Python ArcGIS Raster.summarize用法及代碼示例
- Python ArcGIS RealTimeAnalytics.metrics用法及代碼示例
- Python ArcGIS RealTimeAnalytics.start用法及代碼示例
- Python ArcGIS ResourceManager.update用法及代碼示例
- Python ArcGIS RoleManager用法及代碼示例
- Python ArcGIS RasterManager.add用法及代碼示例
- Python ArcGIS Raster.get_variable_attributes用法及代碼示例
- Python ArcGIS RasterCollection.filter_by_raster_property用法及代碼示例
- Python ArcGIS RealTimeAnalyticsManager.items用法及代碼示例
- Python ArcGIS Raster.get_dimension_names用法及代碼示例
- Python ArcGIS Role.delete用法及代碼示例
- Python ArcGIS ResourceManager.remove用法及代碼示例
- Python ArcGIS RasterInfo.from_dict用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 arcgis.realtime.velocity.feeds.RSS。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。