Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need ability to specify self-hosted url #6

Closed
brandonm4 opened this issue May 10, 2022 · 4 comments
Closed

Need ability to specify self-hosted url #6

brandonm4 opened this issue May 10, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@brandonm4
Copy link

We need a way to specify to baseUrl if the user is not using the clockify cloud.

My suggestions:

\\In PluginSettings.cs - add a new property to hold base url/default to standard
[JsonProperty(PropertyName = "baseApiUrl")]
public string BaseApiUrl { get; set; } = "https://api.clockify.me/api/v1";

\\ClockifyContext.cs
\\change line 130: \\allow for new setting to be passed in
public async Task<bool> SetApiKeyAsync(string apiKey, string baseApiUrl)

\\line 141:  - use it when creating the client
 _clockifyClient = new ClockifyClient(_apiKey, apiUrl: baseApiUrl);

\\ToggleAction.cs
\\lines 80 & 89 - pass the settings to the setup method
await _clockifyContext.SetApiKeyAsync(_settings.ApiKey, _settings.BaseApiUrl);

I may have missed something important, but that seems like it should work

@eXpl0it3r eXpl0it3r added the enhancement New feature or request label May 10, 2022
@eXpl0it3r
Copy link
Owner

Didn't know that Clockify can be self-hosted, will look into adding an base URL option 🙂

@ARegalbuto
Copy link

Can you add a client field? My company uses the same project name over and over, but the thing that changes things is the client name. If I have a unique project name, it works well, but if my project name is the same across multiple clients, it fails.

@eXpl0it3r
Copy link
Owner

eXpl0it3r commented Dec 28, 2022

Oh, I totally forgot to finalize the server URL version. I've implemented it a while ago.

Can you add a client field? My company uses the same project name over and over, but the thing that changes things is the client name. If I have a unique project name, it works well, but if my project name is the same across multiple clients, it fails.

I've created a dedicated issue for it, let's discuss over there: #7

@eXpl0it3r
Copy link
Owner

Implemented with 7f6b77c and published as new release: https://github.com/eXpl0it3r/streamdeck-clockify/releases/tag/1.5

Let me know if you run into any issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants