Browse Source

File structure for the v1 API and some function placeholders.

seavenois 10 năm trước cách đây
mục cha
commit
443a8bbbb1

+ 1 - 0
www/API/help/index.php

@@ -0,0 +1 @@
+ 

+ 1 - 0
www/API/v1/comment.php

@@ -0,0 +1 @@
+ 

+ 1 - 0
www/API/v1/help/index.php

@@ -0,0 +1 @@
+ 

+ 33 - 0
www/API/v1/sync.php

@@ -0,0 +1,33 @@
+<?php
+	Gasteizko Margolariak API v1
+	
+	define('DEF_FORMAT', 'json');
+	
+	/****************************************************
+	* Echoes the version of one or more of the sections *
+	* of the database, or the global section.           * 
+	*                                                   *
+	* @params:                                          *
+	*    con: (MySQL server connection) RO mode enough. *
+	*    section: (string): 'blog', 'activities',       *
+	*             'gallery', 'lablanca', 'global'. None *
+	*             to get them all.                      *
+	*    format: (string): 'json' (default).            *
+ 	****************************************************/
+	function get_version(con, section = '', format = DEF_FORMAT){
+		//TODO
+	}
+	
+	/****************************************************
+	* Echoes the contents of a table from the database. *
+	* Inaccessible or sensitive tables or fields are    *
+	* not printed.                                      *
+	*                                                   *
+	* @params:                                          *
+	*    con: (MySQL server connection) RO mode enough. *
+	*    format: (string): 'json' (default).            *
+ 	****************************************************/
+	function get_table(con, format = DEF_FORMAT){
+		//TODO
+	}
+?>

+ 1 - 1
www/functions.php

@@ -269,7 +269,7 @@
 	
 	/****************************************************
 	* Text shortener. Given a string, it trims in the   *
-	* proximity of the desired streng, ut to the next   * 
+	* proximity of the desired string, ut to the next   * 
 	* white character. If indicated, it will append a   *
 	* link to the full text.                            *
 	*                                                   *

BIN
www/img/spo/.s.swp


+ 1 - 0
www/robots.txt

@@ -8,6 +8,7 @@ Disallow: /galeria/load_photo.php
 Disallow: /galeria/save.php
 Disallow: /error/
 Disallow: /app/
+Disallow: /API/
 Disallow: /css/
 Disallow: /script/
 Disallow: /lang/