Update to handle the new RouterOS v7.18 api syntax with empty responses#104
Update to handle the new RouterOS v7.18 api syntax with empty responses#104xPucTu4 wants to merge 7 commits intodanikf:masterfrom
Conversation
Changed RegEx to allow for sentences with empty values. Fixes danikf#97
Changed EnsureSingleResponse to ignore responses with only ".section" words. Fixes danikf#96
Ignore sections in EnsureSingleResponse
Fixed reading ReSentences with empty value
- Added handling for `ApiEmptySentence` in `ApiCommand.cs` to return an empty list when the first response is empty. - Introduced `!empty` case in `ApiConnection.cs` to process empty responses. - Created `ApiEmptySentence` class to manage empty response types, enhancing API functionality.
Deantwo
left a comment
There was a problem hiding this comment.
Change looks elegant and follows the same conventions as already used in the project.
Update to handle the new RouterOS v7.18 api syntax with empty responses
|
Thanks! I was unsure if I should create an ApiEmptySentence or modify the ReSentence, but this way looks cleaner to me. |
|
I merged your changes into my own fork's master branch, since @danikf has been MIA for a good while. |
Add package metadata to tik4net.csproj
There was a problem hiding this comment.
It looks like you just merged #98 and #99 into your master branch, along with that "Prepare for nuget publishing:", so they are now part of this pull request too. Not sure there is a way to fix that without re-doing your whole pull request. 😨
I don't know if that was my doing somehow. Or if you just clicked a button to pull from upstream or something. 😟
As a reminder, it is usually a good idea to always use a branch on your fork when making a pull request. That way you don't end up with issues like this, where you accidently add more stuff to your master branch.
And as an added bonus, you can give your branches funny descriptive names.
|
You can try making a new branch from the initial commit by going here: https://github.com/xPucTu4/tik4net/tree/4d4ed75f640dfa540d16e1c270653c4532a42512 |
|
Will fix it in a minute. |

ApiEmptySentenceinApiCommand.csto return an empty list when the first response is empty.!emptycase inApiConnection.csto process empty responses.ApiEmptySentenceclass to manage empty response types, enhancing API functionality.Closes #103