From 0d0a357ce1fd5e438f51b2591e5114666e59c9c0 Mon Sep 17 00:00:00 2001 From: "pierre@audrey" Date: Fri, 26 Jan 2024 23:31:23 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9E=95=20ICTime=20plugin=20API=20stub?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jwl.jira/JiraWithICTimePluginApi.cs | 54 +++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 jwl.jira/JiraWithICTimePluginApi.cs diff --git a/jwl.jira/JiraWithICTimePluginApi.cs b/jwl.jira/JiraWithICTimePluginApi.cs new file mode 100644 index 0000000..2bacd8c --- /dev/null +++ b/jwl.jira/JiraWithICTimePluginApi.cs @@ -0,0 +1,54 @@ +namespace jwl.jira; +using jwl.jira.api.rest.common; + +// https://interconcept.atlassian.net/wiki/spaces/ICTIME/pages/31686672/API +public class JiraWithICTimePluginApi + : IJiraServerApi +{ + public HttpClient HttpClient { get; } + public string UserName { get; } + + public JiraWithICTimePluginApi(HttpClient httpClient, string userName) + { + HttpClient = httpClient; + UserName = userName; + _vanillaJiraApi = new VanillaJiraServerApi(httpClient, userName); + } + + private readonly VanillaJiraServerApi _vanillaJiraApi; + + public async Task GetUserInfo() + { + return await _vanillaJiraApi.GetUserInfo(); + } + + public Task GetWorklogTypes() + { + throw new NotImplementedException(); + } + + public Task GetIssueWorklogs(DateOnly from, DateOnly to, IEnumerable? issueKeys) + { + throw new NotImplementedException(); + } + + public Task AddWorklog(string issueKey, DateOnly day, int timeSpentSeconds, string? worklogType, string? comment) + { + throw new NotImplementedException(); + } + + public Task AddWorklogPeriod(string issueKey, DateOnly dayFrom, DateOnly dayTo, int timeSpentSeconds, string? tempoWorklogType, string? comment, bool includeNonWorkingDays = false) + { + throw new NotImplementedException(); + } + + public Task DeleteWorklog(long issueId, long worklogId, bool notifyUsers = false) + { + throw new NotImplementedException(); + } + + public Task UpdateWorklog(string issueKey, long worklogId, DateOnly day, int timeSpentSeconds, string? worklogType, string? comment) + { + throw new NotImplementedException(); + } +}