/// <inheritdoc /> public override async Task <Member> GetMemberAsync(HashId server, HashId member) { var response = await GetResponseProperty <JObject>(new RestRequest($"servers/{server}/members/{member}", Method.Get), "member").ConfigureAwait(false); response.Add("serverId", JValue.CreateString(server.ToString())); return(response.ToObject <Member>(GuildedSerializer) !); }
/// <inheritdoc /> public override async Task <IList <MemberSummary> > GetMembersAsync(HashId server) { var response = await GetResponseProperty <IList <JObject> >(new RestRequest($"servers/{server}/members", Method.Get), "members").ConfigureAwait(false); return(response.Select(x => { // Add serverId property to them x.Add("serverId", JValue.CreateString(server.ToString())); return x.ToObject <MemberSummary>(GuildedSerializer) !; }).ToList()); }
public override string ToString() { return(HashId.ToString("x").ToUpper()); }