Skip to content

Latest commit

 

History

History
128 lines (107 loc) · 6.15 KB

v2.md

File metadata and controls

128 lines (107 loc) · 6.15 KB

API usage

Cores

Getting the list of cores

Returns a list of all available cores for the Analogue Pocket.

GET https://openfpga-cores-inventory.github.io/analogue-pocket/api/v2/cores.json

Example request:

GET /analogue-pocket/api/v2/cores.json HTTP/1.1
Host: https://openfpga-cores-inventory.github.io
Content-Type: application/json
Accept: application/json
Accept-Charset: utf-8

The response is a list of core objects. The response array is wrapped in a data envelope.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "data": [
    {
      "identifier": "ericlewis.Asteroids",
      "repository": {
        "platform": "github",
        "owner": "ericlewis",
        "name": "openfpga-asteroids"
      },
      "download_url": "https://github.com/ericlewis/openfpga-asteroids/releases/download/1.0.1/ericlewis.Asteroids_1.0.1_2022-10-11.zip",
      "platform_id": "asteroids",
      "version": "1.0.1",
      "release_date": "2022-10-11",
      "platform": {
        "category": "Arcade",
        "name": "Asteroids",
        "manufacturer": "Atari Corporation",
        "year": 1979
      },
      "assets": [
        {
          "platform": "asteroids",
          "filename": "asteroid.rom",
          "extensions": [
            "rom"
          ],
          "core_specific": true
        }
      ],
      "sponsor": {
        "github": ["https://github.com/sponsors/ericlewis"]
      }
    }
  ]
}

Where a core object is:

Field Type Required Description
identifier string true The core's unique identifier.
repository object true A repository object describing where the core is hosted.
download_url string true The URL where the packaged core is hosted.
platform_id string true The platform's unique identifier.
version string true The version reported by the core.
release_date string true The date when the release was published.
platform object true A platform object describing the core's platform details.
assets object array true A list asset objects.
sponsor object false A sponsor object describing funding options for the core.

Where a repository object is:

Field Type Description
platform enum The website where the repo is hosted.
owner string The core developer's GitHub username.
name string The core's GitHub repository name.

Where a sponsor object is:

Field Type Description
community_bridge string The URL for the LFX Mentorship (formerly CommunityBridge) project page.
github string array A list of URLs for the GitHub Sponsors pages.
issuehunt string The URL for the IssueHunt page.
ko_fi string The URL for the Ko-fi page.
liberapay string The URL for the Liberapay page.
open_collective string The URL for the Open Collective page.
otechie string The URL for the Otechie page.
patreon string The URL for the Patreon page.
tidelift string The URL for the Tidelift page.
custom string array A list of URLs for custom pages.

Where a platform object is:

Field Type Description
category string The category this platform belongs to.
name string The full name of the platform.
manufacturer string The full name of the manufacturer.
year integer The year of release.

Where an asset object is:

Field Type Required Description
platform string true The core's platform.
filename string false The name of the asset file.
extensions array false A list of valid file extensions for the asset.
core_specific boolean false Indicates if an asset is specific to this core only.

NOTE: If an asset is core_specific, it should be placed in Assets/<platform>/<identifier>. Otherwise, it should be placed in Assets/<platform>/common.

Possible errors:

Error code Description
403 Forbidden The GitHub API rate limit has been exceeded.