I have been working on an API which is based on Laravel framework in PHP, but this is not specific to the language. There is a number of third party APIs are used here in the API and have a number of multiple configurations. So I would like to create an HTTP client factory class, and in the code, I am planning to create an object for this and passing the API name as a parameter. The main issue is how can I resolve this to various classes according to the name of particular API? That is when I give Google, it needs to initialize the Google class and return the Google API client and for other APIs, it should respond with the corresponding client.
I have a confusion like this is a right use case for factory pattern and if it is not, is there any other patterns or standard methods for doing this instead of calling each of the API clients separately.?