/LeanCodeTask

LeanCode recruitment task

Primary LanguageC#MIT LicenseMIT

LeanCodeTask

Application connects to Reddit api to get images.

Available api endpoints:

  • /random - fetches random image url from top 100 hot posts in a given subbreddit
  • /history - fetches downloaded images history

Run the application with docker-compose

Linux

export RedditApi__ClientSecret="<Your Reddit api client secret>"
docker-compose up -d --build

Windows

$env:RedditApi__ClientSecret = "<Your Reddit api client secret>"
docker-compose up -d --build

Application runs on http://localhost:8080

Configure subbreddit

By default application uses r/poland subbreddit. In order to change the subrreddit you have to change the value in appsettings.json.

"RedditApi": {
    ...
    "Subreddit": "<type subreddit name e.g. bitcoin>"
    ...
}