This C# MVC API application will scrape the subreddit r/crytocurrency for mentions of ADA, ETH, BTC, LINK and DOGE in order to inform users what are the most talked about coins in the past 24 hours.
- Git
- C#
- .NET 5.0
- ASP.NET Core
- Entity Framework Core
- MySQL & MySQL Workbench
- Postman
- ApiMvc
- The max results returned for any crypto in a 24 hour period is 600. If there are multiple crypto currencies that return 600, our sortedlist will not work
- Routinely clear our database to ensure data cleanliness
- Decrease loading times by limiting API calls or DRY our code to run more efficiently
- Broaden scope of application to get subreddit comments for all existing cryptocurrencies
Go to SatoshiCrypto
Folder and create a file called appsettings.json
file and input the following script (note the name of the database below needs to match the name of the database you created) Also change [USERNAME]
and [ENTERPASSWORDHERE]
to the password you set prior.
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Port=3306;database=satoshicrypto;uid=[USERNAME];pwd=[ENTERPASSWORDHERE];"
}
}
- Internet browser
- A code editor such as VSCode to view and edit the code
- .NET or follow along with the Installing .NET instructions to install .NET
- Click on the link to my repository: My Repository
- Click on the green "Code" button and copy the repository URL
- Open your terminal and use the command
git clone https://github.com/kdrendel99/Satoshis-Crypto.git
into the directory you would like to clone the repository - Open in text editor to view code and make changes
In order to run the application, please install .NET for your computer to recognize the dotnet
command.
- Download .NET Core SDK (Software Development Kit). Clicking this link will prompt a file download for your particular OS from Microsoft.
- Open the file. Follow the installation steps.
- Confirm the installation is successful by opening your terminal and running the command
dotnet --version
. The response should be something similar to this:5.0.100
. This means it was successfully installed.
MySQL is a type of database software used to create, edit, query, and manage SQL data.
-
For Mac Users please Click Here to download MySQL Installer
-
For Windows Users please Click Here
-
Verify MySQL installation by opening the terminal and entering the command
mysql -u[USERNAME] -p[THEPASSWORDYOUSELECTED]
-
If you gain access you will see see the MYSQL command line!
- Please Click Here to install the correct version for your machine
- Open MySQL Workbench and select
Local instance 3306 server
. You will need to enter the password you selected
- Navigate to the
SatoshisCrypto
folder in the command line - Use the command
dotnet build
to compile - Use the command
dotnet run
to run the application
- Navigate to the SatoshisCrypto folder in the command line
- Use the command
dotnet restore
- Open MySQL Workbench
- Click on Server > Data Import in the top navigation bar
- Select
Import from Self-Contained File
- Select the
Default Target Schema
or create new schema - Select all Schema Objects you would like to import
- Select
Dump Structure and Data
- Click
Start Import
Expand for Database Installation Essentials!
- Navigate to SatoshisCrypto directory in terminal
- Use the command
dotnet ef database update
to generate the database through Entity Framework Core
- Write any new code you wish to add to the database. Use the command
dotnet build
to check for any compiling errors. If no errors, proceed to step 2. - To update the database with any changes made to the code, use the command
dotnet ef migrations add [MigrationsName]
- Use the command
dotnet ef database update
to update the database