< Summary - Syki

Information
Class: Syki.Front.Features.Academic.CreateWebhookSubscription.CreateWebhookSubscriptionClient
Assembly: Front
File(s): /home/runner/work/syki/syki/Front/Features/Academic/CreateWebhookSubscription/CreateWebhookSubscriptionClient.cs
Tag: 21_17346963026
Line coverage
100%
Covered lines: 12
Uncovered lines: 0
Coverable lines: 12
Total lines: 25
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
Create()100%11100%

File(s)

/home/runner/work/syki/syki/Front/Features/Academic/CreateWebhookSubscription/CreateWebhookSubscriptionClient.cs

#LineLine coverage
 1namespace Syki.Front.Features.Academic.CreateWebhookSubscription;
 2
 123public class CreateWebhookSubscriptionClient(HttpClient http) : IAcademicClient
 4{
 5    public async Task<OneOf<CreateWebhookSubscriptionOut, ErrorOut>> Create(
 6        string name,
 7        string url,
 8        List<WebhookEventType> events,
 9        WebhookAuthenticationType AuthenticationType,
 10        string? apiKey
 11    ) {
 1212        var data = new CreateWebhookSubscriptionIn
 1213        {
 1214            Name = name,
 1215            Url = url,
 1216            Events = events,
 1217            AuthenticationType = AuthenticationType,
 1218            ApiKey = apiKey
 1219        };
 20
 1221        var response = await http.PostAsJsonAsync("/academic/webhooks", data);
 22
 1223        return await response.Resolve<CreateWebhookSubscriptionOut>();
 1224    }
 25}