lundi 22 août 2016

Design pattern for integrating different external APIs

I have to integrate external APIs into an application. These are external APIs which provide product details of various types. (Hotels, Transport, Tickets etc..).

Eg.

  • Provider A will have Hotels API.
  • Provider B's API has Transport and Ticket data.
  • Provider C's API has Ticket data.

So these products have various types of attributes and the APIs are in different forms. But they they'll have some common functions like,

  • Product detail
  • Availability
  • Booking

API endpoints.

I would like to have a common middleware interface to connect all the APIs. Which will ease the process of connecting APIs in future. Is there any design pattern to address this scenario?

The main challenge I'm facing is the variation of APIs in terms of querying api. Because even among the same type of products (Eg. tickets) different providers are having different constraints and attributes. That makes harder to come up with a common solution.

Aucun commentaire:

Enregistrer un commentaire