3

有没有办法通过 API 获取 pod 规范(版本、名称、日期等)?我发现最接近的是来自他们网站的搜索请求,而不是 JSON API。

如果您查看 cocoacontrols,则必须有类似于 API 的东西,因为它们会为您的 repo 找到正确的 pod。

背景:我需要查找一个 pod,看看是否有可用的新版本。

我查看了 GitHub Repo,但找不到所需的规格。

4

3 回答 3

4

实际上他们有 API

我知道这个问题太老了,但无论如何它在谷歌中排名第一。所以,至少其他人会知道 CocoaPods 提供了 API。

于 2015-12-19T21:41:13.830 回答
3

Currently the only parts of the CocoaPods system is the command line tool and the specs repo. I can think of a few ways you could do this but they would definitely be more involved than a provided API.

You could use Github's API to query the specs repo. The folder structure for each spec is the same so you would look at repo/specname to see the available version numbers in the form of folders.

If you wanted to do it locally you could do something similar with the folder in ~/.cocoapods/master which is a clone of the specs repo.

于 2013-07-10T21:28:41.300 回答
0

I believe Cocoapods works by directly inspecting the podspecs GitHub repo. You can also customize it to look at a custom spec repo of your choosing (e.g. for pods internal to a company), but there's no API for listing pods.

于 2013-07-10T21:28:44.657 回答