本文整理匯總了Python中obspy.neries.Client.getEventDetail方法的典型用法代碼示例。如果您正苦於以下問題:Python Client.getEventDetail方法的具體用法?Python Client.getEventDetail怎麽用?Python Client.getEventDetail使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類obspy.neries.Client
的用法示例。
在下文中一共展示了Client.getEventDetail方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_getEventDetail
# 需要導入模塊: from obspy.neries import Client [as 別名]
# 或者: from obspy.neries.Client import getEventDetail [as 別名]
def test_getEventDetail(self):
"""
Testing event detail request method.
"""
client = Client()
# EMSC identifier
# xml
data = client.getEventDetail("19990817_0000001", format='xml')
self.assertTrue(isinstance(data, basestring))
self.assertTrue(data.startswith('<?xml'))
# list
data = client.getEventDetail("19990817_0000001", format='list')
self.assertTrue(isinstance(data, list))
# catalog
data = client.getEventDetail("19990817_0000001", format='catalog')
self.assertTrue(isinstance(data, Catalog))
# QuakeML identifier
# xml
data = client.getEventDetail("quakeml:eu.emsc/event#19990817_0000001",
format='xml')
self.assertTrue(data.startswith('<?xml'))
# list
data = client.getEventDetail("quakeml:eu.emsc/event#19990817_0000001",
format='list')
self.assertTrue(isinstance(data, list))
# catalog
data = client.getEventDetail("quakeml:eu.emsc/event#19990817_0000001",
format='catalog')
self.assertTrue(isinstance(data, Catalog))