Giter Site home page Giter Site logo

cel-testacc / read-endpoints Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 47 KB

This is a repository made to integrate multiple API endpoints from multiple sources into one aggregate endpoint.

License: GNU General Public License v3.0

Python 17.17% Go 37.02% Ruby 16.50% JavaScript 29.31%

read-endpoints's Introduction

read-endpoints

This is a repository made to integrate multiple API endpoints from multiple sources into one aggregate endpoint. This is a completed project. To emulate each source endpoint, I used a separate language and/or framework. All the aggregated endpoints will be sourced to a nodejs/fastify web server, which will then join the data into a final result endpoint.

Current scaffolding:

  1. The first endpoint is written in Go and uses the Gin framework. It retrieves the author names.
  2. The second endpoint is written in Python and uses the Flask framework. It retrieves the book titles.
  3. The third endpoint is written in Ruby and uses the Sinatra framework. It retrieves the top quotes from each book.
  4. The final endpoint is the wrapper that collects/aggregates the 3 sources of data into one endpoint and displays the results of that endpoint.

Dependencies:

Go Dependencies:

  • "github.com/gin-gonic/gin"
  • "github.com/go-sql-driver/mysql"
  • "github.com/pkg/errors" (for testing)
  • "github.com/stretchr/testify/assert" (for testing)
  • internal standard library dependencies not listed, but can be compiled during setup

Ruby Dependencies:

  • sinatra
  • mysql2
  • json
  • rack-test

Python Dependencies:

  • flask
  • flask_mysqldb
  • flask_cors

NodeJS Dependencies:

  • fastify

    **Also note that relevant sql files and unit test files are included in each source endpoint.

Putting it all together:

  1. Launch the Go endpoint: Navigate to the project directory and run
go run main.go

You can view the JSON output via the link, e.g.

http://127.0.0.1:8080/titles
  1. Launch the Ruby endpoint: Navigate to the project directory and run
ruby top_quotes.rb

You can view the JSON output via the link, e.g.

http://127.0.0.1:4567/quotes
  1. Launch the Python endpoint: Navigate to the project directory and run
python top-authors.py

You can view the JSON output via the link, e.g.

http://127.0.0.1:5000/authors
  1. Launch the NodeJS wrapper / Fastify endpoint that collects all three endpoints' source data: Navigate to the project directory and run
node server.js

You can view the JSON output via the link, e.g.

http://127.0.0.1:3000/bookdetails

read-endpoints's People

Contributors

cel-testacc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.