- Notifications
You must be signed in to change notification settings - Fork 89
Small Improvements on README #310
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
Small Improvements on README #310
Conversation
Develop -> master
Develop -> master
Develop -> master
Develop -> master
| cc @mikerogers123 . are you still the main dev of this library? I would appreciate your help :) |
| Hi @fbvilela, hope you're good. I am part of the team who aims to maintain this. Will take a look today when I get in 😀 |
| @fbvilela we use cake to execute tasks like running integration tests - see here. Are you suggesting this change in case some folks do not want to run the integration tests via command line? Also (and this appears to not be well documented!) but I believe the target branch should be |
| yes @mikerogers123, I saw the command to run integration tests but after inspecting the code I noticed its heavy dependency on Windows. I assume you folks work on Windows? on macOS this was an easy and quick way for me to get things up and running. I guess we could spend some time trying to make the script run in macOS if that's important but the main reason why I'm playing with this library is to add more support to Cursor Based Pagination and make the switch on the resources that do support it. |
| Hi Mike, Secondly, I'm trying to get the next page of tickets using the following code. I got the first page of tickets, but how do I get the next page? var loggerFactory = new LoggerFactory(); var zendeskOptionsWrapper = new OptionsWrapper<ZendeskOptions>(zendeskOptions); var client = new ZendeskClient(new ZendeskApiClient(zendeskOptionsWrapper), loggerFactory.CreateLogger<ZendeskClient>()); var pager = new CursorPager { Size = 2 }; var ticketResponseCursor = (TicketsListCursorResponse) await client.Tickets.GetAllAsync(pager); while (ticketResponseCursor.Meta.HasMore) { // at this point, we have ticketResponseCursor.Tickets with a count of 2 (page size) var nextPageUrl = ticketResponseCursor.Links.Next; // the lines below doesn't work... but it's somewhat what I would expect // ticketResponseCursor = (TicketsListCursorResponse) client.fetch/get(nextPageUrl); // ticketReponseCursor.getNext() // would execute the request for the next page // ticketResponseCursor.Tickets // expected to be List<Ticket> count 2 - from the second page } |
Within the organisation there is a mixture of Windows and Mac, but on our team we do use Windows predominantly. My initial thoughts would be that getting the cake script running on Mac OS would be preferable - I should make an issue for that.
This change precedes me but if you need to inline the client instantiation, then using However, using an IoC container is the easiest way to manage this as the If you cannot use an IoC container and want to inline the client instantiation then the best option is what you have written probably. Not too sure why it got deprecated, perhaps to encourage people to use IoC but I will check internally and get back to you.
Just seen this issue: #266. This is not supported based on what I can see. Looks like we are just returning the response as it presents from Zendesk, which isn't helpful. We should look at abstracting the "Next" operation away into the TicketsListCursorResponse. We just need to get around to fixing that issue. PRs welcome of course. I will add it to our backlog for prioritisation but that this point cannot make any promises on when it will be addressed |
README.md Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the intent of this section might be better portrayed by "Running integrations tests on Visual Studio for Mac"
if we make this change then we can get rid of the below line as well as it is implicit
b8bd436 to d34e15d Compare | @mikerogers123 @slang25 , I have made a small change in regards to cursor base pagination. We can now set a before/after cursor to the thanks again for your feedback. |
great idea and would love to see this rolled out, but can we split this out into another Pull Request? Otherwise the original intent is lost a bit. This is definitely separately deliverable to the original change of updating the README to help Mac users run integration tests
Whilst I like the idea here, I think I'd like to remain consistent with how we demo/document the other endpoints. At the moment the approach seems to be writing integration tests and add updating README with usage guidance. I personally like the idea of integration tests because they are run as part of the CI process each push so this won't get out of date. This would be part of a separate PR to this one
Again, this is a separate issue that would require separate discussion outside of this PR. My initial thoughts are that we already provide means for consumers to configure the And if they do care about a request coming from this library, it would surely only be useful to know all the instances of this client being used, which would mean enforcing it being present. Let's raise a separate issue for this, perhaps? |
d34e15d to bde4054 Compare bde4054 to 6905362 Compare | ok @mikerogers123 , thanks for that. I have pulled back this PR to its initial intent. should be good to merge? |
| @fbvilela merged just now, thanks! There were however some integration test failures when merging to master: https://github.com/justeat/ZendeskApiClient/actions/runs/6534788092/job/17742786526?pr=313 I will try and get round to looking at it |
| Okay the issue appears to be that Zendesk have removed some endpoints since we last ran these tests. https://support.zendesk.com/hc/en-us/articles/5414949730842 I am looking into this now |
…rovements Small Improvements on README
develop -> master (PR justeat#310 justeat#315)
Description
Just adding a few things to the README about running integration tests on a MAC OS. I'm not a C# developer so the error I was getting was not so obvious, hence the change in
test/ZendeskApi.Client.IntegrationTests/Settings/ZendeskSettings.csI will be making changes in the future to add more support to Cursor Based Pagination to the resources where it's supported.