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

Brubeck should come with a mixin type for models that create a basic api #25

Open
gone opened this issue Oct 29, 2011 · 2 comments
Open
Labels

Comments

@gone
Copy link
Collaborator

gone commented Oct 29, 2011

Creating a document type of APIDocument should give you a simple list/detail api that supports post/put/get/delete

@gone
Copy link
Collaborator Author

gone commented Oct 29, 2011

The detail api is simple enough - /{{objecttype}}/{{objectid}}

Perhaps the list stuff could look like
/objecttype/1;2;3;4;5

And work as a classmethod to avoid instantiating an instance of the model for ever item in the list.

For updating a list of items, I think the respresentation of the items should include the id and arive in the same order as specified in the uri. The id and the uri order should be double checked.

Create should take a list of items to support creating multiple items in a single request

@gone
Copy link
Collaborator Author

gone commented Dec 4, 2011

I think this is done?

https://github.com/gone/brubeck/blob/api/brubeck/models.py#L133

There's currently a bug in mongrel2 that truncates a route path at ; - Although ; seems like a good choice because it's a reserved char in http and has a clear English meaning that maps well, in the meantime I'll flip the separation char to something else

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

1 participant