repository
0.0.0-20221010103513-217f5d752d47
Repository: https://github.com/cemayan/event-scraper.git
Documentation: pkg.go.dev
# README
event-scraper
Introduction
Event scraper is a event collector which is getting data Biletix and Passo
In the future, it will be added more provider
Biletix is Turkey's leading ticketing company. Passo is also ticketing company in Turkey
It can be difficult to follow the events from every site. This app aims to close this gap.
Requirements
For k8s:
- RabbitMQ rabbitmq-operator
- PostgreSQL kubegres
- Skaffold skaffold
- minikube etc minikube
Usage
k8s:
skaffold dev
docker:
docker-compose up
API
User Service
POST :8089/api/v1/user
Parameter | Type | Description |
---|---|---|
username | string | Required. |
password | string | Required. |
email | string | Optional. |
Example Response:
{
"message": "User created {john.doe [email protected]}"
}
Authorization
API requests require the API key. To authenticate an API request, you should provide your API KEY in the Authorization header.
POST :8109/api/v1/auth/getToken
Parameter | Type | Description |
---|---|---|
username | string | Required. |
password | string | Required. |
Example Response:
{
"message": "eyJhbG..."
}
Event API Service
Example Request:
GET :8087/api/v1/event/provider/:provider
Example Response:
[
{
"id": 26262,
"Type": "MUSIC",
"EventName": "*** ",
"Place": "Jolly Joker Vadistanbul",
"FirstDate": "2022-08-17 18:00:00 +0000 UTC",
"SecondDate": "2022-08-17 18:00:00 +0000 UTC",
"Provider": "BILETIX"
},...
]
Documentations
for api:
cd api
godoc -http=:6060 -notes=".*" -index -goroot .
for scraper:
cd scraper
godoc -http=:6060 -notes=".*" -index -goroot .
for user:
cd user
godoc -http=:6060 -notes=".*" -index -goroot .
Testing
In order to start test you should pass before the command
for api:
cd api
ENV="test" go test -v -cover -coverprofile=c.out ./...
go tool cover -html=c.out
for user:
cd user
ENV="test" go test -v -cover -coverprofile=c.out ./...
go tool cover -html=c.out