Skip to main content

Cookie settings

We use cookies to ensure the basic functionalities of the website and to enhance your online experience. You can configure and accept the use of the cookies, and modify your consent options, at any time.

Essential

Preferences

Analytics and statistics

Marketing

Week 11 : Mautic Marketplace : Replacing the API's.

Avatar: Kgitman Kgitman

Welcome to week 11

This week we are starting to replace the Packagist list view page URL first and then will go for the package detail page.
As you know that we are already creating the VIEW from the database to show the LIST. 

So I started implementing all the required fields like name, description,... etc. 

I created and checked in the browser. It's working but there is a problem that it does not include the TOTAL and the structure also doesn't match with the configurable code of mautic or we can say the JSON data structure is not like the Packagist API response. So if we use the new API KEY BY VIEW from our database it will not work, because the data is different.

So this is the major challenge for us. If we plan to use the API KEY from the VIEW then we have to make many changes in mautic side code.
We tried a lot but the total and the data was not working properly. Then my mentor suggested to me the DB Function.

I tried that and it's like a magic that with this we can manage the JSON response as desired.

So I created the DB Function for the list view and after some tries we replaced the Packagist API KEY with the new API KEY and it worked, we can see the additional Packages and now we can search It by name and many more in the package list UI.

So this week after making many changes in DB Functions and trying different approaches we successfully replaced the API KEY for package list. 🚀

Next Week :

planning to do this for the detail Package API and make the JSON data in format that is compatible with the code.

Anything you want to ask related to my project, please do comment below! 

Thanks for your valuable time!

Report inappropriate content

Is this content inappropriate?

Reason:

Loading comments ...

Log in or create an account to add your comment.

Confirm

Please log in

You can access with your Mautic Forums account or create an account here.

Share