Skip to content

Application to scrape data from Wikipedia about important events on all days of the year and API to fetch the data from the database.

Notifications You must be signed in to change notification settings

TSiustis/HistoryNET

Repository files navigation

HistoryNET

About

This application scrapes data from Wikipedia regarding important events on a certain day, saves them into a database and exposes them from API endpoints. Information about the endpoints can be found in the swagger page.

The Web API is written using .NET Core, uses EFCore to store the scraped data and is documment using Swagger.

There is also a front-end part written in ReactJS to display data fetched from the API endpoints.The API must be started for the React App to work properly (the code for the client app is in history.webclient).

Usage

Steps to run the .NET API:
  1. Run Update-Database to generate the database.
  2. Run History.API to generate the data if it is the first time you are running the project. This may take a while as it looks for all days from the year!
  3. (Optional) Modify PageScraper.cs if you don't want to download all data from Wikipedia(whole year) or you want only certain Events.
  4. That's it! You can now access the database using the endpoints.
Steps to run the ReactJS front-end:

1.Ensure you have the latest npm and nodejs versions installed. 2.Ensure the API is running. 3.Enter the folder and type in the command line 'npm install' and then 'npm start' 4.That's it!

Example

.NET API

Swagger documentation

Swagger Main Page

/api/events/GetAllEventsForDay endpoint example

GetAllEventsForDay endpoint

/api/events/{id} endpoint example

/api/event/{id}

ReactJS App

Main Page

Main Page

event-list Page

List Events

About

Application to scrape data from Wikipedia about important events on all days of the year and API to fetch the data from the database.

Topics

Resources

Stars

Watchers

Forks