Skip to content

Question about API formatting #1047

Open
@rdegges

Description

@rdegges

Hi there! Really love this project =D

I work at Snyk and am currently building an integration with your API to help us find events we might want to speak at/sponsor/etc. This is really nifty!

As I've been diving into this a bit more, I have a generic question (sorry if this isn't the best place for it).

I'm primarily using the all-events JSON endpoint: https://developers.events/all-events.json

The format of event entries returned by the API looks like this today:

{
  "name": "KubeCon + CloudNativeCon NA 2023",
  "date": [
    1699228800000,
    1699574400000
  ],
  "hyperlink": "https://events.linuxfoundation.org/kubecon-cloudnativecon-north-america/",
  "location": "Chicago (USA)",
  "city": "Chicago",
  "country": "USA",
  "misc": "<a href="[https: //sessionize.com/kubecon-cloudnativecon-north-america-2023/"><img](https://sessionize.com/kubecon-cloudnativecon-north-america-2023/) alt="CFP KubeCon NA 2023" src="[https: //img.shields.io/static/v1?label=CFP&message=until%2018-June-2023&color=red"></a>](https://img.shields.io/static/v1?label=CFP&message=until%2018-June-2023&color=red)",
  "cfp": {
    "link": "https://sessionize.com/kubecon-cloudnativecon-north-america-2023/",
    "until": "18-June-2023",
    "untilDate": 1687046400000
  },
  "closedCaptions": false,
  "scholarship": false,
  "status": "open"
}

Here's my question: would you be open to potentially changing this format in the future or potentially adding a v2 all-events.json endpoint that allows for some additional formatting? For example, it would be really neat if we could get events back in a format like the following:

{
  "name": "KubeCon + CloudNativeCon NA 2023",
  "date": {
    "start": "2024-03-02",
    "end": "2024-03-02"
  },
  "url": "https://events.linuxfoundation.org/kubecon-cloudnativecon-north-america/",
  "location": "Chicago (US)",
  "city": "Chicago",
  "country": "US",
  "misc": "<a href="[https: //sessionize.com/kubecon-cloudnativecon-north-america-2023/"><img](https://sessionize.com/kubecon-cloudnativecon-north-america-2023/) alt="CFP KubeCon NA 2023" src="[https: //img.shields.io/static/v1?label=CFP&message=until%2018-June-2023&color=red"></a>](https://img.shields.io/static/v1?label=CFP&message=until%2018-June-2023&color=red)",
  "cfp": {
    "url": "https://sessionize.com/kubecon-cloudnativecon-north-america-2023/",
    "end": "2024-12-12"
  },
  "closedCaptions": false,
  "scholarship": false,
  "status": "open"
}

There are a few key changes here:

  • The date array field with UTC timestamps has been changed to an object with "start" and "end" attributes that are strings with YYYY-MM-DD formatting. This is handy since, from what I can tell, no events include specific hour/minute/second/ms info so it's easier to parse/work with.
  • The hyperlink field has been renamed url for consistency (more info below)
  • The country field now uses standard country codes (two letters) for more easy parsability. This way it uses the ISO country codes.
  • The cfp.link field has been renamed cfp.url for consistency (this way, all URLs are referred to with the same field name)
  • The cfp.until field has been renamed cfp.end for consistency with dates above
  • The cfp.end field uses the same date formatting as above: YYYY-MM-DD
  • The status field includes the status in ALL_CAPS and only allows for an enum of options. For example, this might include statuses like: "OPEN", "DONE", "DELAYED", "CANCELED", ... But having these standardized would make it easier to parse/work with, since right now statuses look a tiny bit inconsistent, e.g., "open", "Virtualized", "Canceled", etc.

I'd be happy to contribute, but am curious what your thoughts are on the approach above, if it even makes sense, etc. Thanks for your time! <3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions