CATCH LOC Developers

Login

[그룹관리] 그룹정보 수정 API

Description

위치오브젝트의 그룹의 정보를 수정하는 API.

API

api_code : api.common.group.set.modify

HOST : http://cms.catchloc.com/api.partner.common.php

Method : GET

Protocol : JSON

Parameters

api : api_code
api_key : 고객사 파트너 키
timestamp : Unix timestamp
cert_key : 인증키
group_key : GROUP 인증용 HASH KEY
group_name : 그룹이름, URL ENCODE

Response

result : RESULT
message : result code

Example

Rest API
Android SDK
Swift(iOS) SDK
PHP SDK
Javascript SDK

            ===== Request =====

            http://cms.catchloc.com/api.partner.common.php?
            api=api.common.group.set.modify&
            api_key=xxxxx&
            timestamp=1513319595&
            cert_key=xxxxx&
            group_key=xxxxxx&
            group_name=%ED%85%8C%EC%8A%A4%ED%8A%B8+%EA%B7%B8%EB%A3%B9%EC%9D%B4%EB%A6%84



            ===== Response =====

            - 성공 시            
            {
              "result":"OK",
              "message":"GROUP_MODIFY"
            }

            - 실패 시
            {
                "result":"FAIL",
                "message":"에러 사유"
            }
        

            ===== Request =====

            String group_key = "그룹 인증 HASH KEY";
            String group_name = "새 그룹 이름";

            CatchLoc catchloc = new CatchLoc();

            catchloc.setApiKey("API키");
            catchloc.setServerKey("서버키");

            JSONObject result = catchloc.editGroupName(group_key, group_name);



            ===== Response (JSONObject) =====

            {
                "result"  : "ok",
                "type"    : "jsonobject",
                "message" : API Response Body
            }

        

            ===== Request =====

            import CatchLocSDKForAPI (공통)

            CatchLocAPI.shared.setApiKey(API_KEY)
            CatchLocAPI.shared.setserverKey(SERVER_KEY)

            -GROUP_KEY : GROUP 인증용 HASH KEY
            -GROUP_NAME : 그룹이름, URL ENCODE

            CatchLocAPI.shared.editGroupName(groupKey: GROUP_KEY, groupName: GROUP_NAME)
            { result in
                
                let jsonData = result.response

                혹은

                let jsonString = result.description()
                
            }

            ===== Response =====

            {
                "response" : API Response Body
            }
        

            ===== Request =====

            $group_key = '그룹 인증 HASH KEY';
            $group_name = '새 그룹 이름';

            $catchloc = new CatchLoc();

            $catchloc->setApiKey("API키");
            $catchloc->setServerKey("서버키")

            $result = $catchloc->editGroupName($group_key, $group_name);


            ===== Response (JSON 형태의 문자열) =====

            "{
                "result"  : "ok",
                "type"    : "map",
                "message" : API Response Body
            }"
        

            ===== Request =====

            var callback = function(json)
            {
                api 응답값을 처리하는 콜백함수의 내용
                (예시 : 지도에 위치 출력 혹은 목록 출력)
            };

            var params =
            {
                group_key: '그룹 인증 HASH KEY',
                group_name: '새 그룹 이름',
            };

            CatchLoc.setApiKey("API키");
            CatchLoc.setServerKey("서버키");

            CatchLoc.editGroupName(params, callback);



            ===== Response (JSON, callback 함수의 매개변수 내용) =====

            {
                "result"  : "ok",
                "type"    : "json",
                "message" : API Response Body
            }