raulcorreia7 / Funda_Challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Funda Challenge

.NET API Consumption
Explore the docs »
Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact
  6. Acknowledgements

About The Project

Application Screenshot

This project is a challenge proposed by Funda.

The requirements were to consume a private API and present the Top 10 Makelaars (Real estate agent) in Amsterdam. This can be all Amsterdam houses or just with Tuin (Gardens). There are no more hard requirements beside these.

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

You need the latest .NET 5.0 SDK installation to run this application. You can run this in Linux or Windows.

Installation

  1. Clone the repo
    git clone https://github.com/raulcorreia7/Funda_Challenge.git
  2. Build the project
    # in root folder of git
     make build
         # or
     dotnet build
  3. Create Config.json
     # in root folder of git
     # go to project
     cd FundaAPIClient
    
     cp config_template.json config.json
     # replace the API_KEY in config.json.
     
     # go back to root.
     cd ..
  4. Test the project
    #in root folder of git
    #ensure config.json exists.
    make test
        # or
    dotnet test
  5. Run the project
    cd FundaAPIClient
    
    # ensure config.json exists.
    
    dotnet run -- --apikey=MYKEY --query=all
  6. Build and test
    # in root folder of git
    make all

Usage

# go to project
cd FundaAPIClient

#run help
dotnet run -- --help
Usage:
            fundaclient (--apikey=<key>) (--query=<q>) [--quiet | --debug | --verbose]
            fundaclient --apikey=mykey --query=all
            fundaclient --apikey=mykey --query=tuin
            fundaclient --apikey=mykey --query=all --quiet
            fundaclient --apikey=mykey --query=tuin --verbose
            
#example:
dotnet run -- --apikey=mykey --query=tuin

Remark

After running, the results will display in the console output with the desired logging level.

All output will be logged where the binaries are located.

example: bin/debug/net5.0/logs

Testing will log with multiple log levels (Information, Debug, Verbose), so if you wish to see what happens behind the scenes, check the Test folder for the same thing.

Running Application :

  • --query=all takes approx: ~1min

  • --query=tuin takes approx: ~20secs

  • tests: ~6mins

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Raúl Correia - raulcorreia7@gmail.com

Project Link: https://github.com/raulcorreia7/Funda_Challenge

Acknowledgements

About

License:MIT License


Languages

Language:C# 99.9%Language:Makefile 0.1%