compohub icon indicating copy to clipboard operation
compohub copied to clipboard

Feature request: JSON API

Open pretzelhands opened this issue 10 years ago • 4 comments

Heya!

Today I have a little feature request, that I think might be cool to have: a JSON API Things that should be included would be:

  • Jams that are currently in progress
  • Jams that happen within x days/weeks/months
  • Jams that ended x days/weeks/months ago

That's all I want. :)

pretzelhands avatar Apr 12 '14 14:04 pretzelhands

Agreed! In fact the site could run using the same json api

Lukenickerson avatar Apr 12 '14 15:04 Lukenickerson

I don't know that the site has a backend to give those kinds of features. It would be trivial to change the javascript client the site uses to allow other sites to get the same data.

https://github.com/leafo/compohub/blob/master/jamhub.coffee#L88

friesencr avatar Apr 12 '14 15:04 friesencr

Currently the whole thing is just static files, there is no server side logic. I wouldn't be opposed to having a little PHP script on the server though for dynamically slicing up the json files.

Is this for server side or client side access? If it's for client side I could convert the json files to jsonp and then write some helper javascript you can include on the page that loads the appropriate files.

leafo avatar Apr 13 '14 04:04 leafo

@leafo I'm mostly about the client-side access!

pretzelhands avatar Apr 13 '14 12:04 pretzelhands