summaryrefslogtreecommitdiff
path: root/modules/rest/helpers
AgeCommit message (Collapse)Author
2010-01-09Fix for ticket #972 and more. In Kohana 2.4, ORM::delete_all ignores any whereTim Almdal
clauses and deletes all the entries in the table unless an array of id's are passed as the parameter. This fix used the Database_builder to specify any where conditions. Thanks psvo for find the first one. :-)
2010-01-08Change url parsing in resolve() to ignore the query string.Bharat Mediratta
2010-01-04Further progress on refining the REST server side code.Bharat Mediratta
1) Deal in fully qualified URL resources through the rest interface. All rest methods are now passed the complete url in request->url. 2) Create rest::resolve() which lets individual resource definition code convert a full url into the appropriate matching resource. Implement gallery_rest::resolve() and tag_rest::resolve() 3) Reimplement tag_rest's get() and post() methods. They're much simpler now. 4) Implement the tags_rest helper which supports working with the entire tags collection.
2010-01-03Simplify the REST API code. Here's what I did:Bharat Mediratta
1) Simplify gallery_rest to return flat models, no children and do no validation for now. 2) Flatten the REST replies and use HTTP codes to indicate success/failure instead of additional status messages. 3) Use the message and error code support in the base Exception class, instead of brewing our own in Rest_Exception. 4) Get rid of rest::success() and rest::fail() -- we only need rest::reply() since all failures are covered by throwing an exception. 5) Get rid of /rest/access_key and just use /rest for authentication. 6) Inline and simplify rest::normalize_request since we only use it once 7) Change rest::set_active_user to succeed or throw an exception 8) Extract Rest_Exception::sendHeaders into rest::send_headers() Here's what's currently broken: 1) Data validation. There currently is none 2) Logging. That's gone too 3) image block and tag code is broken 4) Tests are broken 5) No movie support
2010-01-02Remove the Rest_Exception::trigger method.Tim Almdal
2010-01-02Correct file structure tests, Have the tests delete the userid they create ↵Tim Almdal
so as not to impact other tests.
2009-12-31Move the set_active_user and normalize_request methods to rest.php helperTim Almdal
2009-12-31Create a Rest_Exception class and use it to convey status to the client ↵Tim Almdal
instead of calling rest::forbidden and other rest helper error messages.
2009-12-301) Remove the rest::not_found method and replace it with "throw new ↵Tim Almdal
Kohana_404_Exception 2) Don't use the input path to lookup the item via relative_path_cache. Instead use url::get_item_from_uri method.
2009-12-29Found another where statement that required convertingTim Almdal
2009-12-27Clean up validation the check for duplicate names or slugs, finish ↵Tim Almdal
converting the rest API to Kohana 2.4
2009-12-21Added validation to the edit functionality, since we can't trust any inputTim Almdal
2009-12-09Implement the RESTful interface for albums/photos/moviesTim Almdal
2009-12-08Correct the error message when the item is not found; remove the check for ↵Tim Almdal
no request_key (access_token) as athat is treated as public permissions
2009-12-08Change the url mapping so that path to the is part of the urlTim Almdal
The request key is put in the X-Gallery-Request-Key header The HTTP method can be override by using the X-Gallery-Request-Method header Normalize the request data so that it doesn't matter where it comes from (HTTP get or HTTP post request)
2009-12-08Add another error handler "not found" to the rest API.Tim Almdal
Implement the get_album rest request handler.
2009-12-08Rename the backing table from rest_keys to user_access_tokensTim Almdal
Implement an api to format the errors and success messages Removed the custom routing... urls are now /rest/<module_name>/<resource>
2009-12-07The rest framework that the new gallery3 remote interface will be built on. ↵Tim Almdal
At the moment, there are no handlers to perform any functionality.