Code Monkey home page Code Monkey logo

sailor-moon-ktor's Introduction

🌙 Sailor Moon Server

This project shows usage of Kotlin library ktor: Simple REST Server exposing JSON API for Sailor Moon entities.


👉 Here is the Sailor Moon App Repo.

How to run? 🚀

After the download the project, you can open it with Intellij Idea. You can run the project on Application.kt file. This server responds at http://127.0.0.1:8080. You can use Postman for requests and responses.

Endpoints📜

Show All Characters

  • Method : GET
  • Endpoint : /sailormoon/characters
  • Request : localhost:8080/sailormoon/characters
  • Response :
...
{
    "success": true,
    "message": "OK",
    "prevPage": null,
    "nextPage": 2,
    "sailorMoon": [
        {
            "id": 1,
            "name": "Sailor Moon",
            "image": "/images/moon.jpg",
            "realName": "Usagi Tsukino",
            "birthday": "June 30th",
            "age": 16,
            "species": "Human"
        },
        {
            "id": 2,
            "name": "Sailor Mars",
            "image": "/images/mars.jpg",
            "realName": "Rei Hino",
            "birthday": "April 17",
            "age": 16,
            "species": "Human"
        },
        {
            "id": 3,
            "name": "Sailor Mercury",
            "image": "/images/mercury.jpg",
            "realName": "Ami Mizuno",
            "birthday": "September 10",
            "age": 16,
            "species": "Human"
        }
    ]
}
...

Search Characters

  • Method : GET
  • Endpoint : /sailormoon/characters/search?name=
  • Request : localhost:8080/sailormoon/characters/search?name=mars
  • Response :
...
{
    "success": true,
    "message": "OK",
    "prevPage": null,
    "nextPage": null,
    "sailorMoon": [
        {
            "id": 2,
            "name": "Sailor Mars",
            "image": "/images/mars.jpg",
            "realName": "Rei Hino",
            "birthday": "April 17",
            "age": 16,
            "species": "Human",
            "heartRate": 5.0,
            "about": "Rei Hino (火野 レイ, Hino Rei) is the civilian identity and present-day incarnation of Sailor Mars (セーラーマーズ, Seera Maazu). She is a shrine priestess who lives at Hikawa Shrinewith her Grandfather and the crows Phobos and Deimos in the manga."
        }
    ],
    "lastUpdated": null
}
...

Tech Stack 📚

License

Designed and developed by 2023 Betül Necanlı 

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

sailor-moon-ktor's People

Contributors

betulnecanli avatar

Stargazers

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