【发布时间】:2015-07-21 18:09:43
【问题描述】:
我正在使用 Maven 的 REST API 以通过 Python 以编程方式获取存储库中工件的数据。在返回的结果中,我有一个有趣的 JSON 键,对我来说毫无意义。这是我从脚本中获得的结果之一:
{
"id": "junit:junit:4.1",
"g": "junit",
"a": "junit",
"v": "4.1",
"p": "jar",
"timestamp": 1160134625000,
"tags": [
"kent",
"regression",
"junit",
"used",
"framework",
"unit",
"gamma",
"tests",
"developer",
"written",
"implements",
"beck",
"testing",
"java",
"erich"
],
"ec": [
"-javadoc.jar",
"-sources.jar",
".jar",
".pom"
]
}
我的问题是什么是'timestamp'键?这个数字对我没有任何意义。这与自 Unix 纪元以来的秒数有关吗?
另外,我希望在“更新”日期字段中找到信息,当人们访问 Web 界面进行相同查询时看到的信息,如以下 URL:http://search.maven.org/#search|gav|1|g%3A%22junit%22%20AND%20a%3A%22junit%22 p>
这是我用来获取上面显示的 JSON 的 Maven API REST 查询:http://search.maven.org/solrsearch/select?q=g:junit+AND+a:junit&core=gav&rows=1000&wt=json
【问题讨论】: