친구 목록 업데이트

Namespace: Matrix.Component
Assembly: MatrixGames (in MatrixGames.dll)

void Update( 
List<string> friendIDList
List<string> removedFriendIDList
Callback<UpdateResponse> cb 
)
This language is not supported or no code example is available.

Parameters

friendIDList

Type: List<string>

추가할 친구 ID 리스트.

removedFriendIDList

Type: List<string>

삭제할 친구 ID 리스트.

cb

Type: Callback<UpdateResponse>

Callback function

Return Value

  • On Successful -

    cb.result: 0.

    cb.cause: "OK"

    cb.response: Response Data UpdateResponse

  • On Error -

    cb.result: 0가 아닌 integer 값

    cb.cause: 상세 에러 메세지

친구 목록 업데이트하는 Method

IFriend.Info() 로 받아온 서버상의 친구 리스트와

클라이언트가 SNS에서 받아온 친구 리스트가 다를 경우 호출

	
  using UnityEngine;
  using System;
  using System.Collections;
  using System.Collections.Generic;
  using Matrix;
 
  static void onFriendUpdateTest(Matrix.CallbackInfo<Matrix.Domain.Friend.UpdateResponse> info)
  {
      Debug.Log("onFriendUpdateTest Called");
      Debug.Log("result: " + info.result);
 
      if (info.result == 0)
      {
          string message = info.response.StructToJson();
 
          Debug.Log(message);
      }
  }
 
  static void FriendUpdateTest()
  {
      IMatrix API = MatrixManager.Instance;
      List<string> friendsList = new List<string> ();
      List<string> removedFriendList = new List<string> ();
      friendsList.add("addFriendID1");
      friendsList.add("addFriendID2");
      removedFriendList.add("delFriendID1");
      removedFriendList.add("delFriendID2");
      Debug.Log("[FriendUpdateTest]");
 
      API.Friend.Update(friendsList, removedFriendList, onFriendUpdateTest);
  }
 					

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 3.5, 2.0, 1.0

XNA Framework

Supported in: 3.0, 2.0, 1.0