Tim Almdal
40d496edee
Remove extra debug statement in rest_controller::access_key() and restructure the Rest_Tag_Helper_Test to only create items as required for test in each test.
2009-12-31 13:24:00 -08:00
Tim Almdal
0bb13da25a
Add quotes to the module name
2009-12-31 12:47:18 -08:00
Tim Almdal
4611eb2142
Move the set_active_user and normalize_request methods to rest.php helper
2009-12-31 12:32:54 -08:00
Tim Almdal
af10f0abcf
Only create the user or the target photo in the tests that require it.
2009-12-31 12:24:46 -08:00
Tim Almdal
1a12a5e3c8
Create a Rest_Exception class and use it to convey status to the client instead of calling rest::forbidden and other rest helper error messages.
2009-12-31 11:51:51 -08:00
Tim Almdal
11792a12bb
1) Remove the rest::not_found method and replace it with "throw new 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-30 17:08:01 -08:00
Tim Almdal
7e8985d0e8
Found another where statement that required converting
2009-12-29 15:26:18 -08:00
Tim Almdal
bccb6fc021
Clean up validation the check for duplicate names or slugs, finish converting the rest API to Kohana 2.4
2009-12-27 08:32:12 -08:00
Tim Almdal
d0dd6650be
When normalizing the rest request don't assume that the additional arguments are acutall a path. Leave it up to the handler to determine.
2009-12-23 13:13:03 -08:00
Tim Almdal
d622d1aa4f
Updated the unit tests to match the current API
...
Corrected a problem identified with the unit tests... failed if the path was empty on PUT.
2009-12-23 09:32:32 -08:00
Tim Almdal
cbe5a89a9f
Update the api so it allows images to be uploaded.
2009-12-22 12:32:27 -08:00
Tim Almdal
fd7990735c
Added validation to the edit functionality, since we can't trust any input
2009-12-21 11:25:11 -08:00
Tim Almdal
2e221a84cc
Change how request input is processed.First the input is no longer json encode, All the get variables are loaded, then the post variables if the request is a post, and then the path is extracted from the uri.
2009-12-18 14:59:44 -08:00
Tim Almdal
22e813d0be
Updates the the interface based on actually using it.
2009-12-15 10:57:10 -08:00
Tim Almdal
dfc556e8a6
Implement the RESTful interface for albums/photos/movies
2009-12-09 12:06:45 -08:00
Tim Almdal
367f2218f6
Use the relative url cache to look up resources instead of the relative path. This allows us to forego the extension as part of the REST url. As well, urls are consistent between normal usage and rest usage.
2009-12-09 08:41:38 -08:00
Tim Almdal
3c30d595ae
Add the REST get handler for albums/photos/movies
2009-12-08 23:28:50 -08:00
Tim Almdal
9319f37c4f
Correct the error message when the item is not found; remove the check for no request_key (access_token) as athat is treated as public permissions
2009-12-08 23:27:43 -08:00
Tim Almdal
837396ca28
Change the url mapping so that path to the is part of the url
...
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-08 18:06:16 -08:00
Tim Almdal
6fd04069ae
Add another error handler "not found" to the rest API.
...
Implement the get_album rest request handler.
2009-12-08 12:50:13 -08:00
Tim Almdal
fa0663d7df
Rename the backing table from rest_keys to user_access_tokens
...
Implement an api to format the errors and success messages
Removed the custom routing... urls are now /rest/<module_name>/<resource>
2009-12-08 09:19:48 -08:00
Tim Almdal
b0de1fe1d9
Delete Form_Label.php which was accidently committed.
2009-12-07 20:46:18 -08:00
Tim Almdal
71be6cf239
The rest framework that the new gallery3 remote interface will be built on. At the moment, there are no handlers to perform any functionality.
2009-12-07 18:11:26 -08:00