Authorization
You need to provide Authorization
header in form Basic yourtoken
and User-Agent
header
Endpoints
/api/fresh
/api/popular
/api/search
All endpoints accept offset
and limit
(max 1000) query params.
Search endpoint also requires query
endpoint.
Example
curl -H "Authorization: Basic yourtoken" https://swiftpack.co/api/fresh?limit=2
[
{
"fullName": "ridi/URLKit.swift",
"numStars": 1,
"repoURL": "https://github.com/ridi/URLKit.swift",
"lastIndexed": "2021-04-29T18:14:01Z",
"id": "634B7931-CA80-4755-B692-DE3BE6921BB1",
"latestRelease": "0.2.4",
"lastReleaseAt": "2021-04-29T18:14:01Z",
"description": " A Swift URL* additions from RIDI",
"pushedAt": "2021-04-29T12:14:28Z"
},
{
"description": "Extensions and base classes for macOS views and windows",
"repoURL": "https://github.com/mr-elbe5/SwiftyMacViewExtensions",
"lastIndexed": "2021-04-29T18:10:03Z",
"id": "B2F7FE20-2C4C-4368-B493-8DD510310CFD",
"numStars": 0,
"latestRelease": "1.0.3",
"lastReleaseAt": "2021-04-29T18:10:03Z",
"pushedAt": "2021-04-29T17:16:03Z",
"fullName": "mr-elbe5/SwiftyMacViewExtensions"
}
]
Requesting Access Token
Exposing the API is one big experiment and I really wonder what people will want to use it for. Please email petrpavlik@me.com or send me a twitter DM @ptrpavlik
, explaning what you'd like to use the API for. Scraping the API to build your own web version of a swift package catalog is not allowed, and your token will be rejected if I find out.
Hi!
How can i get a token for the API?