prjseal / Package-Script-Writer

Source code for the Package Script Writer tool website
https://psw.codeshare.co.uk
MIT License
22 stars 25 forks source link

#change: Added MarketplacePackageService #28

Closed hannakfoo closed 1 year ago

hannakfoo commented 1 year ago

Hi Paul,

I have create this PR to connect to the Umbraco Marketplace API, but I discovered 1issue with the API: when you call the API with PageIndex 5 and PageSize 50 it still returns 50 results which lead to double package in the result.
I tried checking before adding the range if a package should be added to the result List (allPackages) but failed.

Besides this issue also the category to which a package belongs isnt available in the response. I could do another API call by packageId to get this information but dont know what you think? See the swagger docs: https://api.marketplace.umbraco.com/index.html it is an extra API call which might lead to less performance?

prjseal commented 1 year ago

Hi. This is great progress. When we do the first api call to get 50 we also get the total results. Can we just make the last call be the size of the remaining amount. So if there are 286 the we would do 5 pages of 50 and 1 page of 36. Are you ok to modify it to do that?

prjseal commented 1 year ago

Also don’t worry about the category. We don’t need that at this stage

hannakfoo commented 1 year ago

Hi Paul, the latest commits seems to fix the category name by adding it to the API call field query params and also the tail of remaining amount. Only seems to give some double results, but maybe you can check?

prjseal commented 1 year ago

Thanks for getting it this far. I'll take a look at the duplicates and category issues later.

prjseal commented 1 year ago

Hi, I worked out what was wrong. Just trying to merge and push my changes to fix it now. Thanks so much for the PR

prjseal commented 1 year ago

It's working now and I have pushed it live. Thanks again

umbrabot commented 11 months ago

Hi there @hannakfoo!

First of all: A big #H5YR for making an Umbraco related contribution during Hacktoberfest! We are very thankful for the huge amount of PRs submitted, and all the amazing work you've been doing πŸ₯‡

Due to the amazing work you and others in the community have been doing, we've had a bit of a hard time keeping up. πŸ˜… While all of the PRs for Hacktoberfest might not have been merged yet, you still qualify for receiving some Umbraco swag, congratulations! πŸŽ‰

In the spirit of Hacktoberfest we've prepared some exclusive Umbraco swag for all our contributors - including you!

As an alternative choice this year, you can opt-out of receiving anything and ask us to help improve the planet instead by planting a tree on your behalf. 🌳

Receive your swag or plant a tree! πŸ‘ˆ Please follow this link to fill out and submit the form, before December 15th, 2022, 23:59:00 UTC.

Following this date we'll be sending out all the swag, but please note that it might not reach your doorstep for a few months, so please bear with us and be patient πŸ™

πŸ“’ We have just published a summary of all the activity throughout this year's Umbraco Hacktoberfest.

The only thing left to say is thank you so much for participating in Hacktoberfest! We really appreciate the help!

Kind regards, The various Umbraco teams.