Welcome to the Local Business Lookup API, a highly scalable, easy-to-use and robust RESTful service designed to store and provide critical information about local businesses. Whether you need to find the address, phone number, or website of a business, this API has got you covered.
Using this API, you can:
- Retrieve a comprehensive list of local businesses
- Add a new business to the database
- Access detailed information about a specific business
- Update information of a particular business
- Delete a business from the database
GET /api/businesses
- fetch all businessesPOST /api/businesses
- add a new businessGET /api/businesses/{id}
- retrieve a specific businessPUT /api/businesses/{id}
- update a specific businessDELETE /api/businesses/{id}
- delete a specific business
To explore these endpoints interactively, navigate to
localhost:5000
after starting the service to access Swagger UI.
Follow these steps to get the API up and running:
- Clone this repository.
- Navigate to the root directory in your terminal.
- Create a new file called
appsettings.json
in the root directory.
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Port=3306;database=l[your-db];uid=[your-username];pwd=[your-password];"
}
}
- Add your MySQL
uid
andpwd
in theappsettings.json
file. - Use Postman or Swagger to interact with the API.
To create the necessary tables in your database, run the following commands:
- $ dotnet ef migrations add initial
- $ dotnet ef database update
As of the latest update, there are no known issues or bugs.
This API is built with:
- C#
- .NET
- ASP.NET Core
- Versioning
- Swagger UI
Distributed under the MIT License. See LICENSE
for more information.
I'm Amanda Guan, a passionate software engineer who loves solving problems and creating innovative solutions. Feel free to connect with me on LinkedIn.
Copyright (c) 2023 Amanda Guan