Giter Site home page Giter Site logo

medium-picker's Introduction

medium-picker

Codacy Badge Lint everything License: MIT FOSSA Status

Pick a blog/news site to catch up on so you don't feel like you need to read everything on the internet

How it works

Server

  1. On schedule get all the sites concurrently
  2. Log the failures
  3. Log the success and hash the body of the site
  4. Update the hashes of the sites

Client request

  1. Order by Hit desc
  2. Find the n number of records that were recently changed (based on modified date)
  3. Display the n records that are chosen
  4. Update the n records Hit count

REST API

Method Endpoint Query Request Body Reponse Body Success Code Failures Description
POST /v1/user/{userID} - {"username": string} [{"userId": "string"}] 200 400 409 Create account
PUT /v1/user/{userID}/login - {"username": string} [{"userId": "string"}] 200 400 404 Login
POST /v1/user/{userID}/blog - {"source": string} - 204 400 409 Add a new blog source
GET /v1/user/{userID}/blog/choose n=int - [{"url": "string"}] 200 400 404 Get n blog urls to read

Store Schema

Blogs

Name Type Description
Source string The URL to the site. It's the primary key
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

Users

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

License

FOSSA Status

medium-picker's People

Contributors

ankur22 avatar fossabot avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.