Giter Site home page Giter Site logo

montanasdelpablo / sleeptight-server Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 251 KB

Serverside for Sleeptight. Using Slim Framework and PHP for fetching data from the database into JSON and inserting Senz2 responses from JSON into the SQL Database.

License: Apache License 2.0

ApacheConf 0.36% PHP 99.64%

sleeptight-server's Introduction

Sleeptight-Server

Serverside for Sleeptight. Using Slim Framework and PHP for fetching data from the database into JSON and inserting Senz2 responses from JSON into the SQL Database.

API Register Route

Pattern: localhost/sleeptight-server/api/register

Make a post request to sample URL with the following data:
activation, username, password, name (optional), surname (optional), email (optional)

Sample URL: http://localhost/sleeptight-server/api/register

Sample output if required fields are entered:
{"status": "Success"}

Sample output if required fields are not entred:
{"error": "404", "status": "Inserting went wrong/Not all required fields entered"}


API Auth Route

Pattern: localhost/sleeptight-server/api/auth

Make a post request to sample URL with the following data:
username, password

Sample URL: http://localhost/sleeptight-server/api/auth



Sample output if required fields are entered:
{
  "status": "Success",
  "user": {
    "id": "11",
    "token": "zyxwvutsrqponmlkjihgfedcba",
    "username": "jenny",
    "name": "Koekiemonster",
    "surname": "Aapjes"
  }
}

Sample output if required fields are not entred:
{
  "error": "404",
  "status": "No users found for that credentials"
}


Gebruiker JSON Route

Pattern: localhost/sleeptight-server/api/gebruikers

Sample output:
[{"gebruiker_id":"1","voornaam":"Johan","achternaam":"Derkens","emailadres":"[email protected]"},{"gebruiker_id":"2","voornaam":"Gerda","achternaam":"Burka","emailadres":"[email protected]"},{"gebruiker_id":"3","voornaam":"Frederik","achternaam":"Oppel","emailadres":"[email protected]"}]

Pattern: localhost/sleeptight-server/api/gebruiker/{uid}

Sample URL: http://localhost/sleeptight-server/api/gebruiker/1

Sample output:
{"gebruiker_id":"1","voornaam":"Johan","achternaam":"Derkens","emailadres":"[email protected]"}


sleeptight-server's People

Contributors

montanasdelpablo avatar

Watchers

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