Skip to content
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

Check API consistency for GET/UPDATE/DELETE events #79

Open
fjenett opened this issue Nov 21, 2013 · 5 comments
Open

Check API consistency for GET/UPDATE/DELETE events #79

fjenett opened this issue Nov 21, 2013 · 5 comments
Assignees
Labels

Comments

@fjenett
Copy link
Member

fjenett commented Nov 21, 2013

Creating events is bound to group, all others are not:

POST /event_group//event

whereas:

GET /event/
UPDATE /event/
DELETE /event/

@fjenett fjenett added this to the Finishing phase 1 milestone Feb 4, 2014
@mattes
Copy link
Contributor

mattes commented Mar 6, 2014

GET /api/v1/event/{id}.json
PUT /api/v1/event/{id}.json
DELETE /api/v1/event/{id}.json

... have no dependencies to an event group. The mentioned routes do not need to know their group id to get/put/delete the event. This is different from:

POST /api/v1/group/{event_group_id}/user/{user_id}.json
PUT /api/v1/group/{event_group_id}/user/{user_id}.json
DELETE /api/v1/group/{event_group_id}/user/{user_id}.json

... where the group id must be known in order to:

  • adds a user to an event_group
  • updates attributes for user <-> event_group relation
  • deletes a user from an event_group

I think we should leave the routes as they are atm. But I am open for other opinions.

@mattes
Copy link
Contributor

mattes commented Mar 6, 2014

I close this ticket. Please re-open if necessary.

@mattes mattes closed this as completed Mar 6, 2014
@fjenett
Copy link
Member Author

fjenett commented Mar 6, 2014

I was proposing to let users do a POST /api/v1/event.json sending along a (required) event_group_id instead to make it consistent with the other calls. Could even just be a redirect internally if that is possible.

@mattes mattes reopened this Mar 6, 2014
@mattes
Copy link
Contributor

mattes commented Mar 6, 2014

Please let me know, if you want to go this way and I will implement these routes. (with redirecting)

@mattes mattes self-assigned this Mar 6, 2014
@fjenett
Copy link
Member Author

fjenett commented Mar 7, 2014

I think it is syntactic candy. Let's add this only if we have time for it.

@mattes mattes removed this from the Finishing phase 1 milestone Mar 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants