Create an API for hackathons
Would it be possible to create a hackathons API out of the data? There could be three endpoints
-
/past.json -
/active.json -
/upcoming.json
I could help in creating it.
+1. Should it be in this repo though? It might get cluttered if there are so many files.
Just created it in a new repo. If anyone has a reason it should be in this repo, please feel free to post it here.
For the time being it's running at https://floating-lake-5505.herokuapp.com/
This is a great idea!
Perhaps a webhook could be setup from @japacible's side so that a static file gets updated each time this repo is updated, and the API could just serve the static file. Unless the API is accepting parameters (such as results returned by keyword, location, date, etc), this would save you a heroku dyno and get the same effect :)
@MaxWofford Great work!
Just one thing though, it would be better if the output were more verbose. That is instead of
[
"[Smart Money Hackathon](http://www.eventbrite.com/e/smart-money-hackathon-registration-11443791689)",
"San Francisco, CA",
"6.6 - 6.8",
"Date (2014)",
"Date (2015)"
]
the output could be something like:
[
"name": "Smart Money Hackathon"
"url": "http://www.eventbrite.com/e/smart-money-hackathon-registration-11443791689,
"location": "San Francisco, CA",
"startDate": 20140606,
"endDate": 20140608,
]
@architv I like your format! I've just updated it to output like this:
[{
"name": "All Star Hacks",
"url": "http://allstarhacks.tk/",
"location": "New York City, NY",
"date": "12.12, 2015"
}, {
"name": "HackKings",
"url": "http://hackkings.org/",
"location": "London, UK",
"date": "12.12 - 12.13, 2015"
}]
I'll play with the format of the dates next.
Im not too fond with that date format @MaxWofford . I would recommend having a start and end date separately so people can use proper date formatting tools. The current format is not compatible.
Here is my suggestion:
( I also suggest using ISO Formatted Date Strings and ISO region codes for full region support
{
"name": "All Star Hacks",
"url": "http://allstarhacks.tk/",
"region": "US",
"location": "NYC",
"start-date": "2015-12-12T00:00:00.636Z",
"end-date": "2015-12-13T00:00:00.636Z"
}
@Stephn-R Got it. Writing the dates to be in that format now.
@japacible I was thinking of the edge-case where a hackathon goes through new years. How will that show up so I can account for it when parsing dates from tables?
Forgot to mention in the last message: I haven't added regions yet, so the dates are wrong.
@MaxWofford please do. Without proper region codes, the Date fields wont be properly formatted to support i18n specs
On second though, time is only tracked in days on the table so I'll just track days in the API. Here's a sample:
[{
"name": "All Star Hacks",
"url": "http://allstarhacks.tk/",
"location": "New York City, NY",
"startDate": "2015-12-12",
"endDate": "2015-12-12"
}, {
"name": "HackKings",
"url": "http://hackkings.org/",
"location": "London, UK",
"startDate": "2015-12-12",
"endDate": "2015-12-13"
}]
If I'm not making sense by doing this, please tell me!
This works @MaxWofford
Go for it @MaxWofford
But im worried about the location