GithubHelp home page GithubHelp logo

rest's Introduction

Rest.

Url API.

  • Registration user:

/api/registration/ method POST

Json data (example):

{ "username": "test", "email": "[email protected]", "password": "test" }

Json responce (example):

{"key": "21ec4ba06a92b609333ee1cb1afa7946", "message": "Registration successful"}

  • Get user profile:

/api/profile/?key=API_KEY metod GET.

Json responce (example):

{"email": "[email protected]", "username": "test", "posts_count": 0}

  • Create post:

/api/post/ method POST

json data (example):

{ "key": "a7c0938d36b1c7ef4082ca44a0df2924", "title": "test1 said first", "body": "tes this is a good" }

  • Get user posts.

/api/post/?key=AIP_KEY method GET

[{"body": "POST_BODY1", "title": "POST_TITLE1"}, {"body": "POST_BODY2", "title": "POST_TITLE2"}]

  • Get user posts with paginator (keyword - page):

/api/post/?key=AIP_KEY&page_number method GET

  • Get all posts (keyword - all , without parameters):

/api/post/?key=AIP_KEY&all method GET

  • Search posts (keyword title and body). All arguments must be separated "+":

/api/post/?key=AIP_KEY&all&title=w1+w2&body=w1+w3

Json response (exemple): [{"body": "w1 w3 anything", "title": "something w1 w2 something"}]

rest's People

Contributors

olefirenkok avatar

Watchers

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