Giter Club home page Giter Club logo

matchoddsservice's Introduction

Match Odds Service

A REST Web API for managing sports matches and their betting odds, developed as a technical assignment in the span of 3 days.

Requirements

Infrastructure

For the development of this project, the following requirements were requested:

Entities

For the representation of sports matches and their betting odds, the following entity models were to be created:

Match, with properties:

  • ID
  • Description
  • MatchDate
  • MatchTime
  • TeamA
  • TeamB
  • Sport (enum with values 1 for Football and 2 for Basketball)

MatchOdds, with properties:

  • ID
  • MatchId
  • Specifier (1, X, 2)
  • Odd

Examples

Match

ID Description MatchDate MatchTime TeamA TeamB Sport
1 OSFP-PAO 2021-03-19 12:00 OSFP PAO 1

MatchOdds

ID MatchId Specifier Odd
1 1 X 1.5

Service

The deliverable would be a functional web service that can run autonomously (or in a container as a plus), with the following features:

  • An API controller that implements CRUD functions through the proper use of HTML verbs
  • A design / implementation document in the assignee's desired format (Markdown, Word document, Swagger)
  • Source code is to be hosted on a public repository from one of the popular version control online services (e.g. GitHub, BitBucket).

Implementation

Two API controllers have been implemented for the service:

  • MatchesController, which is being served on base_url/api/matches
  • MatchOddsController, which is being served on base_url/api/matchodds

Both of these controllers support GET, POST, PUT and DELETE operations.

The design / implementation document has been implemented as a Swagger document through Swashbuckle, which can be viewed on base_url/index.html upon running the project successfully.

Build & Run (Docker)

Ensure you have the required dependencies installed:

  • Visual Studio (latest version preferred)
  • .NET Core 3.1 SDK
  • MS SQL Server (latest version preferred)

To build and run the project, open the solution in Visual Studio and run the "Container (Dockerfile)" project.

The service should be available at http://localhost:8001.

Build & Run (Native)

Ensure you have the required dependencies installed:

  • .NET Core 3.1 SDK
  • MS SQL Server (latest version preferred)

To build and run the project, run:

dotnet restore MatchOddsService
dotnet run --project MatchOddsService

The service should be available at https://localhost:5001.

matchoddsservice's People

Contributors

ftsimas avatar

Stargazers

 avatar

Watchers

 avatar  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.