Code Monkey home page Code Monkey logo

swift-ktor-note-rest-api's Introduction

Swift-Ktor-Note-Rest-Api

#SIMPLE NOTE REST API MADE WITH KTOR AND
MONGO DB KTOR LIBRARY KMONGO
Backend for Swift Note App

#HOW TO USE:

  • install intellij, clone this repo and build project.
  • currently this server runs on localhost.
  • you can also use postman to test each endpoint before integrating on client side.


this repository demonstrates how to build an http rest api with ktor, currently there are two routes namely: note route and user route, below are the respective api end points.

#USER ROUTE:

END POINTS METHOD FUNCTION
/user/{uid} GET this endpoint returns a user excluding confidential informations
/user/login POST login endpoint
/user POST this endpoint registers the user
/user/{uid} DELETE this endpoint deletes the user from the mongo db

#NOTE ROUTE:

END POINTS METHOD FUNCTION
/user/{uid}/note GET this endpoint returns all notes for the specified {uid}
/user/{uid}/note?pin=true GET this endpoint returns all pinned notes for the specified {uid}
/user/{uid}/note/{id} GET this endpoint returns a note if the speciifed note {id} is valid
/user/{uid}/note POST this endpoint adds a note to mongo db
/user/{uid}/note/pin/{id} POST this endpoint adds a note to a user's list of pinned notes or removes if already pinned(currently restricted to 4 pinned notes per user).
/user/{uid}/note/{id} DELETE this endpoint deletes a note from mongo db

swift-ktor-note-rest-api's People

Contributors

abghost-cyber avatar

Stargazers

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