Add travis-ci.org configuration
[grauphel.git] / appinfo / routes.php
index 5567670..29ce8ad 100644 (file)
@@ -7,22 +7,6 @@ $application->registerRoutes(
     array(
         'routes' => array(
             array(
-                'url'  => '/test',
-                'name' => 'access#test',
-            ),
-
-            array(
-                'url'  => '/authorize',
-                'name' => 'access#authorize',
-                'verb' => 'POST',
-                ),
-            array(
-                'url'  => '/login',
-                'name' => 'access#login',
-                'verb' => 'GET',
-            ),
-
-            array(
                 'url'  => '/oauth/access_token',
                 'name' => 'oauth#accessToken',
                 'verb' => 'POST',
@@ -49,25 +33,87 @@ $application->registerRoutes(
                 'verb' => 'GET',
             ),
             array(
-                'url'  => '/api/1.0/{user}/note/{guid}',
-                'name' => 'api#note',
+                'url'  => '/api/1.0/',
+                'name' => 'api#indexSlash',
                 'verb' => 'GET',
             ),
             array(
-                'url'  => '/api/1.0/{user}/notes',
-                'name' => 'api#notes',
+                'url'  => '/api/1.0/{username}',
+                'name' => 'api#user',
                 'verb' => 'GET',
             ),
             array(
-                'url'  => '/api/1.0/{user}/notes',
+                'url'  => '/api/1.0/{username}/notes',
                 'name' => 'api#notes',
-                'verb' => 'POST',
+                'verb' => 'GET',
             ),
             array(
-                'url'  => '/api/1.0/{user}',
-                'name' => 'api#user',
+                'url'  => '/api/1.0/{username}/notes',
+                'name' => 'api#notesSave',
+                'verb' => 'PUT',
+            ),
+            array(
+                'url'  => '/api/1.0/{username}/note/{guid}',
+                'name' => 'api#note',
+                'verb' => 'GET',
+            ),
+
+            array(
+                'url'  => '/',
+                'name' => 'gui#index',
+                'verb' => 'GET',
+            ),
+            array(
+                'url'  => '/tag/{rawtag}',
+                'name' => 'gui#tag',
+                'verb' => 'GET',
+            ),
+            array(
+                'url'  => '/note/{guid}.html',
+                'name' => 'notes#html',
+                'verb' => 'GET',
+            ),
+            array(
+                'url'  => '/note/{guid}.txt',
+                'name' => 'notes#text',
+                'verb' => 'GET',
+            ),
+            array(
+                'url'  => '/note/{guid}.xml',
+                'name' => 'notes#xml',
+                'verb' => 'GET',
+            ),
+            array(
+                'url'  => '/note/{guid}',
+                'name' => 'gui#note',
+                'verb' => 'GET',
+            ),
+            array(
+                'url'  => '/tokens',
+                'name' => 'gui#tokens',
+                'verb' => 'GET',
+            ),
+            array(
+                'url'  => '/database',
+                'name' => 'gui#database',
                 'verb' => 'GET',
             ),
+            array(
+                'url'  => '/database',
+                'name' => 'gui#databaseReset',
+                'verb' => 'POST',
+            ),
+
+            array(
+                'url'  => '/tokens/{username}/{tokenKey}',
+                'name' => 'token#delete',
+                'verb' => 'DELETE',
+            ),
+            array(
+                'url'  => '/tokens/{username}/{tokenKey}',
+                'name' => 'token#deletePost',
+                'verb' => 'POST',
+            ),
         )
     )
 );