GithubHelp home page GithubHelp logo

documents's Introduction

API Documents

Accounts

Login

POST /api/users/login/
  • Paremeters
Parameter Description Notes
username Username max_length=20
password Password Password should contain both numbers and English letters, with the length no less than 6 and no more than 20.
  • Return

Success example:

{"id":1,"last_login":"2018-09-10T20:26:58.277522+08:00","username":"test","email":"[email protected]","avatar_url":"https://www.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?s=328&r=g&d=identicon","address":"","site_url":"","description":""}

Failed example:

{"password":["This field is required."]}
{"non_field_errors":["Username or password is incorrect."]}

Register

POST /api/users/register/
  • Paremeters
Parameter Description Notes
username Username max_length=20
email Email
password Password Password should contain both numbers and English letters, with the length no less than 6 and no more than 20.
  • Return

Success example:

{
    "id": 1,
    "last_login": "2018-09-10T20:12:33.140150+08:00",
    "username": "test",
    "email": "[email protected]",
    "avatar_url": "https://www.gravatar.com/avatar/f2c97b1f2d2898cd2d6466ce95d4ba33?s=328&r=g&d=identicon",
    "address": "",
    "site_url": "",
    "description": ""
}

Failed example:

{"username":["A user with that username already exists."],"email":["user with this email address already exists."]}
{"username":["This field is required."],"email":["This field is required."],"password":["This field is required."]}

documents's People

Contributors

volltin avatar

Watchers

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