New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API for schedule HTML generation #153
Comments
Two things I would mention on this:
Also have to think about tags as they didn't have translations before 2014. |
As for the past conferences... do we really need to think about them? Do you think people will actually use that old information? :-) |
Just want to make sure we specify the behavior since the API will be available for those too |
It makes more sense to me not to include tags for the past conferences, then, since that field was quite misused back then. |
I'll think about it. Might be able to just provide it without translations. And for the record, here is a sample code for an early version: sessions=Session.for_conference(c).with_state(['accepted', 'pending_confirmation']).includes([:author, :second_author, :session_type])
data = sessions.map do |session|
{
id: session.id,
title: session.title,
authors: session.authors.compact.map(&:full_name),
tags: session.keywords.map{|t| I18n.t(t)},
session_type: I18n.t(session.session_type.title)
}
end
{sessions: data}.to_json |
Was giving 500 when the session couldn't be found. Returning 404 is much better.
Ended up not needing to add the extension as it defaults to json. Path is /api/sessions/:id. Format defaults to json and locale defaults to pt (app default locale). |
Deployed in production |
It is important for attendees to know that certain sessions have a limited number of attendees. Adding audience limit so that the schedule can show such sessions.
I will need an API that, given the session id and locale, returns the following a json with session details.
Such as, when I request the URL:
submissoes.agilebrazil.com/2014/api/session/1108?locale=pt
I get the following json:
The text was updated successfully, but these errors were encountered: