aboutcode-org / aboutcode-org/purldb

What data belongs in api_url vs. api_data_url?

Đang mở
#472 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
data
Ngôn ngữ chính
HTML
Star
67
Fork
69
Merge trung bình
8 ngày 8 giờ
Pull request đã merge (30 ngày)
1

Mô tả

Working on fetchcode/package.py and related files for the `metadata` command output data, including adding cocoapods download support, I have used the `api_url` key for one of the three cocoapods podspec URLs:

- `f"https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/{hashed_path}/{name}/{tag}/{name}.podspec.json"`

Some (many?) PURLs with a GitHub repo define their `api_url` key using the `"https://api.github.com/repos"` path which leads to JSON data, e.g.,

- pkg:github/avahi/avahi@0.8 -- "api_url": "https://api.github.com/repos/avahi/avahi"

Most cocoapods seem to have a GitHub repo, and thus my use of `api_url` for cocoapods podspec files prevents using that key for the `"https://api.github.com/repos"` JSON data (if available). The only other URL key I see that perhaps could be used by cocoapods PURLs is `api_data_url`. I don't recall seeing any info() output where `api_data_url` had a value, but maybe I missed it.

An example of a cocoapod with a podspec URL and a `"https://api.github.com/repos"` JSON file:

- `pkg:cocoapods/ZendeskSDK@4.0.1`
- https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/6/5/9/ZendeskSDK/4.0.1/ZendeskSDK.podspec.json
- https://api.github.com/repos/zendesk/zendesk_sdk_ios

Is there a preferred set of keys to use for cocoapods that have both a podspec URL and a GitHub repo (and thus might also have `"https://api.github.com/repos"` data)?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.