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

feat(kno-3533): schedules support #10

Merged
merged 3 commits into from
May 9, 2023

Conversation

juanazam
Copy link
Contributor

@juanazam juanazam commented May 3, 2023

Adds support for working with workflow schedules:

  • Creating schedules
  • Updating schedules
  • Listing schedules
  • Deleting schedules
  • List schedule for user
  • List schedule for object

Also fixes 2 bugs:

  • Bug when using numbers as query params
  • Bug when not passing any params to various endpoints

@@ -126,6 +126,14 @@ private static string UrlEncodeAndClean(string value)
result.Add(new KeyValuePair<string, string>(key, s));
break;

case int i:
result.Add(new KeyValuePair<string, string>(key, i.ToString()));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found out passing options like page_size: 1 was not working unless using a string instead of a number.
Decided to fix it.

@@ -23,7 +23,7 @@ public class MessagesResource : BaseResource
/// <returns>A paginated Message response.</returns>
public async Task<PaginatedResponse<Message>> List(Dictionary<string, object> options = null)
{
if (options.ContainsKey("trigger_data"))
if (options != null && options.ContainsKey("trigger_data"))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default options value is null, so this was breaking when not passing an options Dictionary

@juanazam juanazam force-pushed the jazambuja-kno-3533-dotnet-skd-add-schedules-support branch from a596cc2 to fe4f73b Compare May 3, 2023 17:24
Copy link
Contributor

@cjbell cjbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 lgtm

@juanazam juanazam merged commit 85f244a into main May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants