We were super impressed by your application. Well done! To move forward we have some additional questions for you.
Hi ! You’re requested to implement functionality to fetch a list of elements from an API, filtering from the currently logged in user preferences for that integration (think of it as if you needed to fetch tweets from specific Twitter users).
The user will be able to enter an alphanumeric list of elements, which should be then passed on as an array to the API calls.
For the sake of examples, you can use https://httpbin.org/post as the URL to post data to, and use the headers returned there as the return data from the API.
The site is using the Storefront theme for WooCommerce.
You do not need to complete the task, rather, explain how you would approach it. Provide a rough coding plan how to implement the plugin, or provide where to change code in the existing codebase of the site. Include how long will it take you to complete the task, and please send your approach by the date indicated in your email correspondence.
We get a couple of questions every so often, these may help for any clarifications:
1. Is this a plugin that I as a website owner would install and add API credentials for, which would allow customers to customize what they want to see? Or would customers have their own API access credentials that they would need to add in their settings screen?
• API credentials would be from the site owner, not each user.
2. Does the API have an end point which shows a schema that we could use to dynamically keep the list of available elements updated? Or are we hard coding it all?
• There's no schema available, you'd hardcode the variables that you need to store according to the current version of the API.
3. What purpose does the widget serve? Simply showing different API content in a sidebar on the site, based on the currently logged in user and if no one logged in, show no content at all?
• Exactly, mainly the purpose of this widget it's to see how you as a developer would interact with an external API.
4. How much flexibility is required for the displaying of the data in the widget and the my account tab? Are we hard coding a layout for them, or building some sort of a templating system where they can use their own html & css to show the API element data?
• Implement the layout however you see fit as per the first clarification (this is a plugin configured on the server, not by each customer). Ideally templates could be replaced from the theme, but that's not a requirement.
5. So you're basically wanting me to write a plugin with functions not fully fleshed out? Like a bunch of pseudo code in comments?
• Yeah, it's so we know your flow, how you approach your code. What things you keep in mind while building it, which functions you use. Not pseudo code, real code, but not fully fleshed out. It doesn't need to be pixel perfect on the frontend. We won't put it to run, we'll review it code wise and standards wise.