.NET API Consumption
Explore the docs »
Report Bug
·
Request Feature
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.
To get a local copy up and running follow these simple steps.
You need the latest .NET 5.0 SDK installation to run this application. You can run this in Linux or Windows.
- Clone the repo
git clone https://github.com/raulcorreia7/Funda_Challenge.git
- Build the project
# in root folder of git make build # or dotnet build
- 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 ..
- Test the project
#in root folder of git #ensure config.json exists. make test # or dotnet test
- Run the project
cd FundaAPIClient # ensure config.json exists. dotnet run -- --apikey=MYKEY --query=all
- Build and test
# in root folder of git make all
# 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
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
Distributed under the MIT License. See LICENSE
for more information.
Raúl Correia - raulcorreia7@gmail.com
Project Link: https://github.com/raulcorreia7/Funda_Challenge