This repository was archived by the owner on Jun 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Metadata HashToString
Plorence edited this page Nov 14, 2020
·
1 revision
MatchDetail 객체의 Hash가 존재하는 모든 필드 값을 ID(Hash)에서 읽을 수 있는 문자열로 변환합니다.
필드의 필드까지 탐색합니다.
만약 해당 ID가 없다면 두 번째 인수를 대입합니다.
- 첫 번째 인수로 해쉬에서 문자열로 바꿀 객체를 전달하면 됩니다.
- 두 번째 인수로 해당 ID(Hash)가 없다면 사용할 값을 전달하면 됩니다.
없음
using Kartrider.API;
using Kartrider.API.Model;
using System;
namespace test
{
class Program
{
static void Main(string[] args)
{
Metadata metadata = new Metadata(true);
KartAPI kartAPI = new KartAPI("API KEY");
MatchDetail matchDetail = kartAPI.GetMatchDetail("01ef001a880b7652");
metadata.HashToString(matchDetail);
Console.WriteLine(matchDetail.MatchType); //스피드 팀전
}
}
}MatchResponse 객체의 Hash가 존재하는 모든 필드 값을 ID(Hash)에서 읽을 수 있는 문자열로 변환합니다.
필드의 필드까지 탐색합니다.
만약 해당 ID가 없다면 두 번째 인수를 대입합니다.
- 첫 번째 인수로 해쉬에서 문자열로 바꿀 객체를 전달하면 됩니다.
- 두 번째 인수로 해당 ID(Hash)가 없다면 사용할 값을 전달하면 됩니다.
없음
using Kartrider.API;
using Kartrider.API.Model;
using System;
namespace test
{
class Program
{
static void Main(string[] args)
{
Metadata metadata = new Metadata(true);
KartAPI kartAPI = new KartAPI("API KEY");
MatchResponse matchResponse = kartAPI.GetMatchesByAccessId("302575272", null, null, 0, 5, new string[]{
"effd66758144a29868663aa50e85d3d95c5bc0147d7fdb9802691c2087f3416e" //스피드 팀전
}); //가장 최근 매치부터 스피드 팀전 매치 5판 조회
metadata.HashToString(matchResponse);
Console.WriteLine(matchResponse.Matches[0].MatchType); //스피드 팀전
}
}
}AllMatches 객체의 Hash가 존재하는 모든 필드 값을 ID(Hash)에서 읽을 수 있는 문자열로 변환합니다.
필드의 필드까지 탐색합니다.
만약 해당 ID가 없다면 두 번째 인수를 대입합니다.
- 첫 번째 인수로 해쉬에서 문자열로 바꿀 객체를 전달하면 됩니다.
- 두 번째 인수로 해당 ID(Hash)가 없다면 사용할 값을 전달하면 됩니다.
없음
using Kartrider.API;
using Kartrider.API.Model;
using System;
namespace test
{
class Program
{
static void Main(string[] args)
{
Metadata metadata = new Metadata(true);
KartAPI kartAPI = new KartAPI("API KEY");
AllMatches allMatches = kartAPI.GetAllMatches(null, null, 0, 110); //가장 최근 매치부터 110판 조회
metadata.HashToString(allMatches);
Console.WriteLine(allMatches.Matches[0].MatchType);
}
}
}위와 같음
위와 같음
위와 같음
위와 같음
위와 같음