Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 1.09 KB

intimacy.md

File metadata and controls

51 lines (37 loc) · 1.09 KB
uid title
Guides.QuickReference.Http.Intimacy
亲密度相关接口

亲密度相关接口

预声明变量

readonly KookSocketClient _socketClient = null;
readonly KookRestClient _restClient = null;

SocketUser socketUser = null;

RestUser restUser = null;

IUser user = null;

GET /api/v3/intimacy/index

// API 请求
RestIntimacy intimacyFromSocket = await socketUser.GetIntimacyAsync();
RestIntimacy intimacyFromRest = await restUser.GetIntimacyAsync();
IIntimacy intimacy = await user.GetIntimacyAsync();

POST /api/v3/intimacy/update

string socialInfo = null; // 社交信息
uint imageId = default; // 形象图片 ID
int score = default; // 亲密度

// API 请求
await user.UpdateIntimacyAsync(x =>
{
    x.SocialInfo = socialInfo;
    x.ImageId = imageId;
    x.Score = score;
});