![codecov](https://camo.githubusercontent.com/1441d853d7a150af8b0d328321008959fad9dcd4e3a3ec78447ce9896ab1ed95/68747470733a2f2f636f6465636f762e696f2f67682f616e6b757232322f6d656469756d2d7069636b65722f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d54354e4b454c31324357)
Pick a blog/news site to catch up on so you don't feel like you need to read everything on the internet
CGO_ENABLED=0 go build -ldflags="-X 'main.Version=`cat VERSION.txt`' -X 'main.Commit=`git rev-parse HEAD`'" -o ./app cmd/server/main.go
- Implement Postgres store for UserStorer
- Implement Postgres store for MediumSourceStorer
- Implement MediumSourcePicker
- On schedule get all the sites concurrently
- Log the failures
- Log the success and hash the body of the site
- Update the hashes of the sites
- Order by Hit desc
- Find the n number of records that were recently changed (based on modified date)
- Display the n records that are chosen
- Update the n records Hit count
Method |
Endpoint |
Query |
Request Body |
Reponse Body |
Success Code |
Failures |
Description |
POST |
/v1/user |
- |
{"username": string} |
{"userId": "string"} |
201 |
400 409 |
Create account |
PUT |
/v1/user/login |
- |
{"username": string} |
{"userId": "string"} |
200 |
400 404 |
Login |
POST |
/v1/user/{userID}/medium |
- |
{"source": string} |
- |
204 |
404 409 |
Add a new medium source |
GET |
/v1/user/{userID}/medium |
p=int |
- |
[{"source": string, "Id": string, "nextPage": int}] |
200 |
400 |
Get all the sources (paginated) |
DELETE |
/v1/user/{userID}/medium/{Id} |
- |
- |
- |
204 |
404 |
Delete a medium source |
GET |
/v1/user/{userID}/medium/pick |
c=int |
- |
[{"url": "string", "Id": string}] |
200 |
400 404 |
Get c medium urls to read |
Name |
Type |
Description |
URL |
string |
The URL to the site. It's the primary key |
ID |
string |
A UUID |
Hash |
string |
The hash of the webpage |
Multiplier |
float |
Increase the chance of it being picked |
CreatedDate |
date |
When the record was created |
ModifiedDate |
date |
When the record was modified |
Hit |
int |
Number of times this record was picked |
UserId |
string |
The user token this is associated with |
Name |
Type |
Description |
Email |
string |
The user's email address |
UserId |
string |
A UUID. It's the primary key |
CreatedDate |
date |
When the record was created |
ModifiedDate |
date |
When the record was updated |
![FOSSA Status](https://camo.githubusercontent.com/cd63f4ed0f2ec3b892f3bd84b20ff162a015e7a64f0316706476fc74afe2f7c2/68747470733a2f2f6170702e666f7373612e636f6d2f6170692f70726f6a656374732f637573746f6d25324232303939322532466769746875622e636f6d253246616e6b757232322532466d656469756d2d7069636b65722e7376673f747970653d6c61726765)