"FingerTown"의 두 판 사이의 차이

김준호위키
이동: 둘러보기, 검색
(register api)
(API)
 
(같은 사용자의 중간 판 2개는 보이지 않습니다)
10번째 줄: 10번째 줄:
  
 
=== API ===
 
=== API ===
 +
* rule
 +
* ex) http://oht.junho85.pe.kr/server/auth/register
 +
** fixed server url: http://oht.junho85.pe.kr/server/
 +
** big category: auth/
 +
** action: register/
  
 
==== user ====
 
==== user ====
98번째 줄: 103번째 줄:
 
===== item delete api =====
 
===== item delete api =====
 
* test: http://oht.junho85.pe.kr/server/item/delete?item_id=7
 
* test: http://oht.junho85.pe.kr/server/item/delete?item_id=7
 +
 +
==== places (places.json) ====
 +
* coffeshop, parks, ...
 +
<source lang="javascript">
 +
{ "places": [ {     "id": 1, "name": "The Handmade Coffe", "type": "Coffeshop", "coordinates": [ [ [ [ 126.9104254245758, 37.55368741183799 ], [ 126.91045761108398, 37.55373844562581 ], [ 126.91132128238678, 37.55401913083414 ], [ 126.91169142723083, 37.55267523449288 ], [ 126.91106915473938, 37.552598682705934 ], [ 126.91071510314941, 37.5527007517377 ], [ 126.9104254245758, 37.55368741183799 ] ] ] ], "label": {     "latitude":"37.5532059116456",       "longitude":"126.91110687330365" } }  ]}
 +
</source>
 +
 +
===== place add =====
 +
 +
==== user locations (users.json) ====
 +
<source lang="javascript">
 +
{ "users": [   {       "user_id":"1",       "town_id":"1",       "user_name":"Dominik",       "latitude":"37.55558042300999",       "longitude":"126.9110805541277",       "created":"2013-10-05 20:41:45",       "gender": 1   },   {       "user_id":"2",       "town_id":"1",       "user_name":"Susi",       "latitude":"37.55255243262988",       "longitude":"126.90893478691578",       "created":"2013-10-05 20:41:45",       "gender": 0   } ]}
 +
</source>
 +
 +
==== user projects (projects.json) ====
 +
<source lang="javascript">
 +
{ "projects": [ {     "id": 1, "name": "Users Project", "description": "Blablabl", "latitude":"37.5532059116456", "longitude":"126.91110687330365" }  ]}
 +
</source>
 +
 +
==== complains.json ====
 +
<source lang="javascript">
 +
{ "complains": [ {     "id": 1, "town_id": 1, "name": "Complain", "description": "Description whats wrong in this complain", "image_path": "folder/image/upload/2013/11/1/complain.png", "latitude":"37.5532059116456",       "longitude":"126.91110687330365", "rating": 0.6 }  ]}
 +
</source>
 +
 +
==== place_complain.json ====
 +
<source lang="javascript">
 +
{ "complains": [ {     "id": 1, "town_id": 1, "place_id": 1, "name": "Complain", "description": "Description whats wrong in this complain", "coord_x":"37",       "coord_y":"5", "rating": 0.6 }  ]}
 +
</source>
  
 
=== CodeIgniter ===
 
=== CodeIgniter ===

2013년 11월 24일 (일) 21:10 기준 최신판

FingerTown

Server

DB

  • MySQL

API

user

register api
column comment
email email
avatar character
password password
  • test:
jQuery.post( "http://oht.junho85.pe.kr/server/auth/register",{
    email: "junho85@daum.net",
    nickname: "my nick",
    avatar: 2,
    password: "1234", }).done(function( data ) {
        console.log( "Data Loaded: " + data );
    });
  • return
    • success
      {"result":"success","message":"register success"}
      
    • fail
errcode explanation
500 undefined
501 duplicated email
{"result":"fail","errcode":"501","message":"junho852@daum.net already exists"}
login api
jQuery.post( "http://oht.junho85.pe.kr/server/auth/login", { email:"junho85@gmail.com", password: "1234" }).done(function(data ) {
        console.log( "Data Loaded: " + data ); 
    });
logout api

item

item (tree and others) data list api
[{"id":"1","user_id":"1","town_id":"1","detail":"testtree","type":"1","coord_x":"100","coord_y":"100","latitude":"0.000000","longitude":"0.000000","picture":"","likecount":"0","created":"2013-10-0520:41:45"},{"id":"2","user_id":"1","town_id":"1","detail":"testtree2","type":"1","coord_x":"150","co...
item data api (single data)
test1{"id":"1","user_id":"1","town_id":"1","detail":"testtree","type":"1","coord_x":"100","coord_y":"100","latitude":"0.000000","longitude":"0.000000","picture":"","likecount":"0","created":"2013-10-0520:41:45"}
item add api
item delete api

places (places.json)

  • coffeshop, parks, ...
{	"places": [		{		    "id": 1,			"name": "The Handmade Coffe",			"type": "Coffeshop",			"coordinates": [				[					[						[							126.9104254245758,							37.55368741183799						],						[							126.91045761108398,							37.55373844562581						],						[							126.91132128238678,							37.55401913083414						],						[							126.91169142723083,							37.55267523449288						],						[							126.91106915473938,							37.552598682705934						],						[							126.91071510314941,							37.5527007517377						],						[							126.9104254245758,							37.55368741183799						]					]				]			],			"label": {			    "latitude":"37.5532059116456",	      		"longitude":"126.91110687330365"			}		}   	]}
place add

user locations (users.json)

{	"users": [	   {	      "user_id":"1",	      "town_id":"1",	      "user_name":"Dominik",	      "latitude":"37.55558042300999",	      "longitude":"126.9110805541277",	      "created":"2013-10-05 20:41:45",	      "gender": 1	   },	   {	      "user_id":"2",	      "town_id":"1",	      "user_name":"Susi",	      "latitude":"37.55255243262988",	      "longitude":"126.90893478691578",	      "created":"2013-10-05 20:41:45",	      "gender": 0	   }	]}

user projects (projects.json)

{	"projects": [		{		    "id": 1,			"name": "Users Project",			"description": "Blablabl",			"latitude":"37.5532059116456",			"longitude":"126.91110687330365"		}   	]}

complains.json

{	"complains": [		{		    "id": 1,			"town_id": 1,			"name": "Complain",			"description": "Description whats wrong in this complain",			"image_path": "folder/image/upload/2013/11/1/complain.png",			"latitude":"37.5532059116456",	      	"longitude":"126.91110687330365",			"rating": 0.6		}   	]}

place_complain.json

{	"complains": [		{		    "id": 1,			"town_id": 1,			"place_id": 1,			"name": "Complain",			"description": "Description whats wrong in this complain",			"coord_x":"37",	      	"coord_y":"5",			"rating": 0.6		}   	]}

CodeIgniter

test

Helper

git 사용

사용법

  • clone

가져오기 git clone 으로 가져 온다.

  • add

가져오기 git addapplication/ license.txt system user_guide/

  • commit

커밋. 하지만 바로 올라기지는 않는다. push 로 올려 준다. git commit -m "test"

gitcommit -a ? 뭔가 잘 안되는듯?

  • push

서버에 올린다. git push -u origin master