Lingr API 의 문제점

기타 2011. 11. 4. 20:28
API를 설명한 위키페이지에서는 


session.create

Creates a new Lingr API session. Once you create a session, you must perform some API call at least once every ten minutes, or the session will time out and be automatically destroyed.

HTTP Method:

  • POST
URL:
  • http://www.lingr.com/api/session/create

Parameters:

api_key * Your API Key
client_type The type of your API client- if provided, must be either human or automaton. If not provided, the default is automaton. For more information, see the client type page.

(*) Required

Example Response:

<?xml version="1.0" encoding="UTF-8"?>
<response>
 
<status>ok</status>
 
<session>g5K1smWyhwa</session>
</response>

라고 설명되어 있었다. 그러나 api_key값이 정확하게 무엇인지 설명도 나와있지않다. developer 페이지에 가면 key와 secret이 있는데 이 값을 넣어도 도저히 안된다.

그래서 구글링을 통해 API메모 라는 이름으로 된 GitHub 페이지를 발견했다. 그곳에선


 
session/create

セッションID作成する

リクエスト

POST
user: ユーザ名
password: パスワード

レスポンス

session: セッションID
nickname: ニックネーム
public_id: パブリックID
is_online: online/offline
user.name: 表示名
user.username: ユーザ名

ユーザ名かパスワードが無効のときは
{status: “error”, code: “invalide_user_credentials”, … }

が返る 

 라고 되어있는데
해석하자면  POST방식으로 user값엔 유저 ID를, password라는 값엔 비밀번호를 입력하게 하면 값이 돌아온다 설명해놓고 각 값에 대한 의미를 설명했다.

이 사이트를 보고 나는 다시 이 방식대로 해보고 제대로 값이 돌아오는 걸 볼 수 있었다.

도데체 난..... 왜 뻘짓을 한거냐.... 아무튼... 공식 설명 사이트의 위키 최종 갱신일이 2008년인걸 보면..... 공식 위키는 참조할만한데가 못되는거 아닌가 싶다... 

'기타' 카테고리의 다른 글

헝가리안 표기법!  (0) 2011.11.08
Nateon Client  (0) 2011.11.07
핑퐁 스크립트  (1) 2011.07.14
ざわざわ  (0) 2011.06.07
잡담 여러개  (0) 2011.06.04

설정

트랙백

댓글