Helps users to get the articles published in NewYork Times newspaper from September, 1851 to last month. The news articles are extracted from NewYork Times through APIs will be used for data-processing and NLP (as per your requirements). This project is built using Go (GoLang) web framework Gin and MySQL.
- Install Go programming language (Go or GoLang).
- Install any code editor or IDE which has support for Go.
- Install all dependency packages using
go get.go get -u github.com/gin-gonic/gingo get -u github.com/jinzhu/gormgo get -u github.com/go-sql-driver/mysqlgo get golang.org/x/crypto/bcrypt
- Install
MySQLorMariaDB- (Both will act like same). - Configure MySQL/MariaDB with a username and password.
- Create a database inside the MySQL which is needed to run go http server.
- Configure NY API (nytimes) credentials in
configurations/static/nyapiconf.jsonfile.
- Download and install
MariaDBorMySQL. - Create an user with a strong password.
- Create a database with a suitable name.
- Update the database configuration file with the username and password.
- Create a email-id from any email service.
- Grant permission to the email to use it from any 3rd party application.
- Update the email configuration file.
- Run Application.
- Format:
go run <filename>.go - Example:
go run main.go
- Format:
- Build Application with dependencies (Creates executables).
- Format:
go build <filename>.goorgo build - Example:
go build main.go
- Format:
- POST /api/v1/user/register
- POST /api/v1/user/login
- GET /api/v1/user/logout
- GET /api/v1/user/details
- GET /api/v1/archive/details/:year/:month
- Register an user with
/api/v1/user/registerAPI call. - Login with the registered user details,
/api/v1/user/loginAPI call. - You will get Auth Token when login.
- Set the auth token request header
Authorization: Bearer YourTokenfor all API calls, after login. - API call
/api/v1/user/detailsis for getting the details of logged in user. - To get the list of all articles link and details for a particular year and month call
/api/v1/archive/details/:year/:monthAPI. - To logout from the application, use
/api/v1/user/logoutAPI call.
- Don't fotgot to change the configurations for the application in
configurationsdirectory. https://golang.org/dl/https://code.visualstudio.com/#alt-downloadshttps://downloads.mariadb.org/https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them
This software is licenced under GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007.