< 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: 4_16869239191
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
 103public 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    ) {
 1012        var data = new CreateWebhookSubscriptionIn
 1013        {
 1014            Name = name,
 1015            Url = url,
 1016            Events = events,
 1017            AuthenticationType = AuthenticationType,
 1018            ApiKey = apiKey
 1019        };
 20
 1021        var response = await http.PostAsJsonAsync("/academic/webhooks", data);
 22
 1023        return await response.Resolve<CreateWebhookSubscriptionOut>();
 1024    }
 25}