Skip to content

Monster Hunter Companion that helps players Craft Weapons and Find their locations. The API is deployed on Azure.

License

Notifications You must be signed in to change notification settings

MidTermProject/Monster-Hunter-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monster Hunter API


Authors: Ariel R. Pedraza, Luay Younus, Dustin Mundy
Version: 1.0.0

Overview

An API created from scratch used to request and modify a database of blademaster weapons for the game Monster Hunter Generations with CRUD routes.

Getting Started

The following are required to run the program locally.

  1. Clone the repository to your local machine.
  2. Cd into the application directory where the MonsterHunterAPI.sln exist.
  3. Open the application using Open/Start MonsterHunterAPI.sln.
  1. Once the App is opened, Right click on the application name from the Solution Explorer Window and select Add -> New Item -> find ASP.NET Configuration File and open add it to the project.
  • Inside this file, change the Connection String to the following to connect to database
"ConnectionStrings": {
    "DefaultConnection": "Server=(localdb)\\MSSQLLocalDB;Database=TaskDB;Trusted_Connection=True;MultipleActiveResultSets=true"
}
  1. Click Tools -> NuGet Package Manager -> Package Manager Console then run the following commands in the console.
- Install-Package Microsoft.EntityFrameworkCore.Tools
- Add-Migration Initial
- Update-Database
  1. Once the database is updated, you can Run the application by clicking on the Play button .

Database Schema

DatabaseSchema

API Endpoints

Link to deployment on Azure

APIEndPointBlade

Link to Swagger API Documentation

APIEndPointSwagger

Weapons/Blades

Getting all Blades from the Database

GET: /api/blade/

Getting a single Blade by ID. This endpoint will return a list of materials in the returned Blade object

GET: /api/blade/:bladeId

Filtering list of blades by Weapon Or/And Element Or/And Rarity

GET: /api/blade/:weaponClass/:element/:rarity

Post/Create a new Weapon/Blade on the Database

POST: api/blade

Update a blade/weapon

PUT: api/blade/:id

Delete a blade from the database

DELETE: api/blade/:id

Blade JSON Example

[
    {
        "id": 1,
        "parent": null,
        "hasChild": true,
        "weaponClass": "Long Sword",
        "name": "Iron Katana 1",
        "description": "A Long Sword forged with Eastern methods. Durable and resilient, but requires regular upkeep.",
        "rawDamage": 70,
        "elementType": null,
        "elementDamage": 0,
        "sharpness": "Yellow",
        "rarity": 1,
        "affinity": 0,
        "slots": 0,
        "defense": 0,
        "imgUrl": null,
        "materials": null
    },
    {
        "id": 2,
        "parent": {
            "id": 1,
            "parent": null,
            "hasChild": true,
            "weaponClass": "Long Sword",
            "name": "Iron Katana 1",
            "description": "A Long Sword forged with Eastern methods. Durable and resilient, but requires regular upkeep.",
            "rawDamage": 70,
            "elementType": null,
            "elementDamage": 0,
            "sharpness": "Yellow",
            "rarity": 1,
            "affinity": 0,
            "slots": 0,
            "defense": 0,
            "imgUrl": null,
            "materials": null
        }
	}
]

Materials

Getting all materials from Database

GET: /api/material

Getting one material by ID

GET: /api/material/:id

Posting a material with a list of locations

POST: /api/material

Material Json Example

[
    {
        "id": 1,
        "name": "Iron Ore",
        "rarity": 4,
        "description": null,
        "quantity": 0,
    },
    {
        "id": 2,
        "name": "Earth Crystal",
        "rarity": 4,
        "description": null,
        "quantity": 0
    },
    {
        "id": 3,
        "name": "Disc Stone",
        "rarity": 4,
        "description": null,
        "quantity": 0
    },
    {
        "id": 4,
        "name": "Machalite Ore",
        "rarity": 4,
        "description": null,
        "quantity": 0
    }
]

Locations

Getting All Locations from Database

GET: /api/location

Getting one Location by ID

GET: /api/:locationId

Creating a new Location

A location object requires properties of Name and Area

POST: api/Location

Update an existing Location

PUT: api/Location/:id

Delete a location

DELETE: api/Location/:id

Locations JSON Example

[
    {
        "id": 1,
        "name": "The Forrest",
        "area": 5,
        "dropRate": 13,
        "action": "mining"
    },
	{
        "id": 2,
        "name": "The Hill",
        "area": 12,
        "dropRate": 4,
        "action": "climbing"
    }
]

Frameworks & Dependencies

  • Entity Framework Core
  • ASP.NET Core
  • Swashbuckle
  • Xunit

Architecture

C# ASP.NET Core MVC Application

About

Monster Hunter Companion that helps players Craft Weapons and Find their locations. The API is deployed on Azure.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages