GetUserInfo

IDtail.com API

Jump to: navigation, 찾기

목차

[편집] QUERY

http://api.idtail.com/get_user_info/<USERNAME> (FOAF 형식으로 요청)
http://api.idtail.com/get_user_info/<USERNAME>.foaf
http://api.idtail.com/get_user_info/<USERNAME>.json[?callback=json callback]
  • FOAF 형식은 xml 파서 혹은 foaf 파서가 존재한다고 가정하고 요청하는 방식입니다. 따라서, 개발시에 적절한 파서를 준비해야합니다.
  • json 형식의 요청은 자바스크립트에서 바로 호출하기 위한 방법으로 사용됩니다.
  • jsonp 로 알려진 script tag의 src 인자로 넣어주는 형식을 위해 callback을 넣어 사용하기를 권합니다.

[편집] RETURN

  • FOAF 형식
<?xml version="1.0" encoding="UTF-8"?><rdf:RDF
       xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
       xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
       xmlns:foaf="http://xmlns.com/foaf/0.1/"
       xmlns:admin="http://webns.net/mvcb/">
<foaf:PersonalProfileDocument rdf:about="">
       <foaf:maker rdf:resource="#IDtail 사용자 ID"/>
       <foaf:primaryTopic rdf:resource="#IDtail 사용자 ID"/>
       <admin:generatorAgent rdf:resource="http://www.idtail.com/"/>
</foaf:PersonalProfileDocument>
<foaf:Person rdf:ID="IDtail 사용자 ID">
       <foaf:name>이름</foaf:name>
       <foaf:openid>아이디테일에서 발급한 OpenID</foaf:openid>
       <foaf:nick>닉네임</foaf:nick>
       <foaf:gender>male 또는 female</foaf:gender>
       <foaf:locality>첫번째 지역명</foaf:locality>
       <foaf:locality>두번째 지역명</foaf:locality>
       <foaf:locality>세번째 지역명</foaf:locality>
       <foaf:interest>
               <rdf:Description rdfs:label="관심분야 1"/>
               <rdf:Description rdfs:label="관심분야 2"/>
               <rdf:Description rdfs:label="관심분야 3"/>
               <rdf:Description rdfs:label="관심분야 4"/>
       </foaf:interest>
       <foaf:workplaceHomepage rdf:resource="홈페이지"/>
       <foaf:mbox_sha1sum>인증된 이메일의 해시값</foaf:mbox_sha1sum>
       <foaf:weblog rdf:resource="홈페이지"/>
       <foaf:homepage rdf:resource="홈페이지"/>
       <foaf:depiction rdf:resource="100x100 이미지" />
       <foaf:img rdf:resource="100x100 이미지" />
</foaf:Person>
</rdf:RDF>
  • JSON
{
    "owner":{
        "fields":{
            "id" : "아이디테일 ID",
            "name":" 이름 ",
            "nick":" 닉네임 ",
            "openid": " 아이디테일에서 발급한 오픈아이디 ",
            "img" : " 100x100 아이콘 ",
            "gender" : " male 또는 female ",
            "mbox_sha1sum" : " foaf:mbox_sha1sum 값과 같은 메일주소 해시값 ", 
            "workplaceHomepage" : " 공개된 재직중인 회사의 홈페이지 ",
            "weblog" : " 홈페이지 ",
            "homepage" : " 홈페이지 ",
            "locality" : [
                "첫번째 지역명",
                "두번째 지역명",
                "세번째 지역명"
            ],
            "interest" : [
                {     
                    "label" : "관심분야 1"
                },
                {     
                    "label" : "관심분야 2"
                }
                ...
            ]
        }
    }
}

[편집] RESULT SAMPLES

  • FOAF 형식
<?xml version="1.0" encoding="UTF-8"?><rdf:RDF
       xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
       xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
       xmlns:foaf="http://xmlns.com/foaf/0.1/"
       xmlns:admin="http://webns.net/mvcb/">
<foaf:PersonalProfileDocument rdf:about="">
       <foaf:maker rdf:resource="#coolengineer"/>
       <foaf:primaryTopic rdf:resource="#coolengineer"/>
       <admin:generatorAgent rdf:resource="http://www.idtail.com/"/>
</foaf:PersonalProfileDocument>
<foaf:Person rdf:ID="coolengineer">
       <foaf:name>최호진</foaf:name>
       <foaf:openid>http://coolengineer.idtail.com/</foaf:openid>
       <foaf:nick>coolengineer</foaf:nick>
       <foaf:gender>male</foaf:gender>
       <foaf:locality>서울특별시/영등포구/여의도동/</foaf:locality>
       <foaf:locality>서울특별시/송파구/풍납동/</foaf:locality>
       <foaf:interest>
               <rdf:Description rdfs:label="리눅스"/>
               <rdf:Description rdfs:label="웹2.0"/>
       </foaf:interest>
       <foaf:workplaceHomepage rdf:resource="http://www.ahnlab.com/"/>
       <foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum>
       <foaf:weblog rdf:resource="http://coolengineer.com/"/>
       <foaf:homepage rdf:resource="http://coolengineer.com/"/>
       <foaf:depiction rdf:resource="http://coolengineer.idtail.com/icon/100x100.jpg" />
       <foaf:img rdf:resource="http://coolengineer.idtail.com/icon/100x100.jpg" />
</foaf:Person>
</rdf:RDF>
  • JSON 형식
{
    "owner":{
        "fields":{
            "id" : "http://coolengineer.idtail.com/",
            "name":"최호진",
            "nick":"coolengineer",
            "openid":"http://coolengineer.idtail.com/",
            "img" : "http://coolengineer.idtail.com/icon/100x100.jpg",
            "gender" : "male",
            "mbox_sha1sum" : "da39a3ee5e6b4b0d3255bfef95601890afd80709", 
            "workplaceHomepage" :"http://www.ahnlab.com/",
            "weblog" : "http://coolengineer.com/",
            "homepage" : "http://coolengineer.com/",
            "locality" : [
                "서울특별시/영등포구/여의도동/",
                "서울특별시/송파구/풍납동/",
                "서울특별시/송파구/풍납동/"
            ],
            "interest" : [
            {     
                "label" : "리눅스"
            },
            {     
                "label" : "웹2.0"
            }]
        }
    }
}

[편집] PROGRAM SAMPLE

예제를 확인하세요

[편집] ERROR