Coder Social home page Coder Social logo

socialbrothersapi's Introduction

SocialBrothersAPI

Instructies

Opstarten

  1. Clone de repository.
  2. Open een commandline interface in de root folder van het project.
  3. Voer command dotnet run uit als .NET correct is geïnstalleerd.
  4. De swagger documentatie pagina opent als het goed is automatisch.

Gebruiken endpoints

  • Voor de filter endpoint gebruik je /api/address/filter/{value}. Hierbij kan value alles zijn en er wordt dan in ieder field van alle adressen gezocht op deze value. Gebruik bijvoorbeeld 'dreef'.
  • Voor de sort endpoint gebruik je /api/address/sort/{direction}/{field}. Hierbij moet direction 'ascending' of 'descending' zijn en field moet een bestaande field uit de Address model zijn. Gebruik bijvoorbeeld 'ascending' en 'street'.
  • voor de distance endpoint gebruik je /api/address/distance/{id1}/{id2}. Hierbij is id1 en id2 allebei de id van een bestaande Address in de database. Gebruik bijvoorbeeld 1 en 9.
  • Alle standaard CRUD endpoints spreken voor zich.

Goede en slechte punten

Goed

De code voor het filteren en sorteren van Addresses is beknopt en volledig dynamisch en het maakt dus ook niet uit of je velden aan Address verwijderd of toevoegt.

Slecht

De CalculateDistance methode is niet volledig accuraat. De afstand in km komt wel in de buurt maar zit er meestal net iets onder. Dit zou ik graag nog wel willen oplossen, maar in principe is de logica en mijn aanpak van het proces duidelijk.

socialbrothersapi's People

Contributors

tjrklaassen 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.