Saturday, 19 September 2020

How to inject a service instance or external object into this backend?

This is more of a design pattern type questionTAKE THIS example of a messenger bot by FacebookAll methods are triggered by facebook s webhook systemIts all fun and games when everything is simpleLets say I had a currencyConverter object which is basically a cron job running every minute to refresh rates in a separate fileWhat is the standard pattern pattern or way to insert this currencyConverter into this botTake the receiveMessage method HEREHow do I structure my code to call converterObject.convert(source, destination) inside that?

Submitted September 19, 2020 at 10:56AM by amazeguy

No comments:

Post a Comment