Skip to content
Samantha Jayasinghe edited this page Feb 19, 2018 · 28 revisions

API Explorer

API Explorer is featured to call the third-party API's via any interface.

How it supports to Quick Book API Explorer

API Explorer implements the Quick Book Adapter which supports to get the following information

  • Quick Book API access token
  • Execute HTTP Request for any HTTP method( Get, Post, Put, Delete )
  • Get all endpoints

API Explorer Architecture

Component Diagram

The component diagram shows the interconnection of application layers.

API Middleware class Diagram

The class diagram describes how classes are arranged in packages.

  • The HTTPClient class implements IClient interface. The current implementation is based on Guzzle client but it can be to extended with other client implementations as well( eg : CURL, PSR7)
  • API Adapter package uses Adapter design pattern. However, the system supports many third-party API adapters as well, provided that, it implements IAdapter interface. Currently, System is implemented for QuickBook API adaptor.
  • QuickBook API Adapter encrypt access token to improve the key security.

API Web application

  • API Web application implements as a single page application ( SPA)
  • The 'Connect' button makes a call to API middleware and derives an access token
  • This access token and application metadata are saved in browser's local storage
  • Endpoint request form is loaded dynamically based on access point information
  • Response box is also loaded dynamically based on API middleware response information

How to scale the microservice

  • API middleware is developed as a microservice and it can be deployed as a docker container
  • Depending on the number of requests for the application it's possible to spin up another container

CI/CD Pipeline

Build

This project is integrated using travis-ci.com and is built for the following PHP versions.

  • PHP 5.6 Travis Test
  • PHP 7.0 Travis Test
  • PHP 7.1 Travis Test
  • PHP 7.2 Travis Test

Code Coverage

Code coverage report is integrated with codecov.io and it shows code coverage percentage.

  • Coverage : codecov