コード例 #1
0
 public Task<Response<Subscription>> UpdateAsync(string subscriberId, string address, string statusPageId = null, Grain[] granular = null)
 {
     return client.PatchAsync<Response<Subscription>>("subscriber/update", new
     {
         statuspage_id = client.GetStatusPageId(statusPageId),
         subscriber_id = subscriberId,
         address,
         granular = granular != null ? string.Join(",", granular.Select(g => g.ToApiString())) : null
     });
 }
コード例 #2
0
 public Task<Response<bool>> AddAsync(string method, string address, string statusPageId = null, bool silent = false, Grain[] granular = null)
 {
     return client.PostAsync<Response<bool>>("subscriber/add", new
     {
         statuspage_id = client.GetStatusPageId(statusPageId),
         meth = method,
         address,
         silent = silent ? "1" : "0",
         granular = granular != null ? string.Join(",", granular.Select(g => g.ToApiString())) : null
     });
 }