コード例 #1
0
 /// <inheritdoc />
 public async Task <IGroupRule> CreateGroupRuleAsync(IGroupRule groupRule, CancellationToken cancellationToken = default(CancellationToken))
 => await PostAsync <GroupRule>(new HttpRequest
 {
     Uri     = "/api/v1/groups/rules",
     Verb    = HttpVerb.Post,
     Payload = groupRule,
 }, cancellationToken).ConfigureAwait(false);
コード例 #2
0
 /// <inheritdoc />
 public async Task <IGroupRule> UpdateRuleAsync(IGroupRule groupRule, string ruleId, CancellationToken cancellationToken = default(CancellationToken))
 => await PutAsync <GroupRule>(new HttpRequest
 {
     Uri            = "/api/v1/groups/rules/{ruleId}",
     Payload        = groupRule,
     PathParameters = new Dictionary <string, object>()
     {
         ["ruleId"] = ruleId,
     },
 }, cancellationToken).ConfigureAwait(false);