"FingerTown"의 두 판 사이의 차이

김준호위키
이동: 둘러보기, 검색
(user)
12번째 줄: 12번째 줄:
  
 
==== user ====
 
==== user ====
* register api
+
===== register api =====
** method: POST only
+
* method: POST only
** url: http://oht.junho85.pe.kr/server/auth/register
+
* url: http://oht.junho85.pe.kr/server/auth/register
** test:  
+
* test: <source lang="javascript">
<source lang="javascript">
 
 
jQuery.post( "http://oht.junho85.pe.kr/server/auth/register",{ email: "junho85@daum.net",nickname: "my nick", avatar: 2, password: "1234",  }).done(function( data ) {
 
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 );
 
         console.log( "Data Loaded: " + data );
 
     });
 
     });
 
</source>
 
</source>
** return
+
* return
*** success
+
** success <source lang="javascript">
<source>
 
 
{"result":"success","message":"register success"}
 
{"result":"success","message":"register success"}
 
</source>
 
</source>
*** fail
+
** fail
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
38번째 줄: 36번째 줄:
 
| duplicated email
 
| duplicated email
 
|}
 
|}
<source>
+
<source lang="javascript">
 
{"result":"fail","errcode":"501","message":"junho852@daum.net already exists"}
 
{"result":"fail","errcode":"501","message":"junho852@daum.net already exists"}
 
</source>
 
</source>
  
* login api
+
===== login api =====
** method: POST only
+
* method: POST only
** url: http://oht.junho85.pe.kr/server/auth/login
+
* url: http://oht.junho85.pe.kr/server/auth/login
** test:
+
* test:
 
<source lang="javascript">
 
<source lang="javascript">
 
jQuery.post( "http://oht.junho85.pe.kr/server/auth/login", { email:"junho85@gmail.com", password: "1234" }).done(function(data ) {
 
jQuery.post( "http://oht.junho85.pe.kr/server/auth/login", { email:"junho85@gmail.com", password: "1234" }).done(function(data ) {
51번째 줄: 49번째 줄:
 
     });
 
     });
 
</source>
 
</source>
* logout api
+
===== logout api =====
** json - http://oht.junho85.pe.kr/server/auth/logout
+
* json - http://oht.junho85.pe.kr/server/auth/logout
** json - http://oht.junho85.pe.kr/server/auth/logout?callback=?
+
* json - http://oht.junho85.pe.kr/server/auth/logout?callback=?
  
 
* user list api - just for testing
 
* user list api - just for testing

2013년 11월 24일 (일) 20:51 판

FingerTown

Server

DB

  • MySQL

API

user

register api
  • method: POST only
  • url: http://oht.junho85.pe.kr/server/auth/register
  • 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

[{"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...

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"}



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