Git Product home page Git Product logo

sns-api-in-beego's Introduction

#Rest API List(alpha)

##用户

  1. 登陆 /users/login [get] phone=;password=
  2. 注册 /users [post] phone=;password=
  3. 修改个人信息 /users/ID [put] phone;password;email;gender;birthday;name;nick;head;
  4. 关注 /ul [post] following;
  5. 取消关注 /ul/ID[delete]
  6. 关注列表 /ul/following [get]
  7. 粉丝列表 /ul/follower [get]
  8. 注销 /users/logout [get]

##图片

  1. 发布照片 /photos [post]photo;title
  2. 我的照片列表 /photos [get]offset;
  3. 喜欢 /likes/ID [post] photo_id;
  4. 取消喜欢 /likes/ID [delete]
  5. 评论 /comment[post]photo_id;content;
  6. 删除评论 /comment/ID [delete]

##专题文章

  1. 创建专题 /articles [post] title;content
  2. 专题列表 /articles [get]
  3. 更新专题 /articles/ID [put]title;content;
  4. 专题详情 /articles/ID [get]

##统一返回格式Json

  • Err:int (0为正常,1为错误)
  • Data:(为数组或者对象数据)
  • Msg:(string,提示信息)
{
    "Err": 0,
    "Data": {
        "Id": 16,
        "CreatedAt": "2014-10-09T17:00:42.761450016+08:00",
        "UpdatedAt": "2014-10-09T17:00:42.76145004+08:00",
        "TargetId": {
            "Id": 43,
            "Title": "ttttt",
            "Path": "static/uploads/photos/2014-10-08/be/bea280464513b4e4ced845d0ea89cd0d.jpg",
            "CreatedAt": "2014-10-08T12:46:32+08:00",
            "UpdatedAt": "2014-10-08T12:46:32+08:00",
            "UserId": {
                "Id": 29,
                "Email": "[email protected]",
                "Password": "123",
                "Gender": 0,
                "Phone": "18611358272",
                "Birthday": "",
                "CreatedAt": "2014-10-05T15:23:27+08:00",
                "UpdatedAt": "2014-10-05T15:23:27+08:00",
                "Name": "tttt",
                "Following": 1,
                "Follower": 0,
                "Head": ""
            },
            "Likes": 0
        },
        "UserId": {
            "Id": 29,
            "Email": "[email protected]",
            "Password": "123",
            "Gender": 0,
            "Phone": "18611358272",
            "Birthday": "",
            "CreatedAt": "2014-10-05T15:23:27+08:00",
            "UpdatedAt": "2014-10-05T15:23:27+08:00",
            "Name": "tttt",
            "Following": 1,
            "Follower": 0,
            "Head": ""
        }
    },
    "Msg": ""
}
{
    "Err": 0,
    "Data": [
        {
            "CreatedAt": "2014-10-09T17:05:18+08:00",
            "Following__Id": 36,
            "Following__Name": "fffff"
        },
        {
            "CreatedAt": "2014-10-09T17:05:16+08:00",
            "Following__Id": 35,
            "Following__Name": "1231\n"
        },
        {
            "CreatedAt": "2014-10-09T16:53:21+08:00",
            "Following__Id": 32,
            "Following__Name": "afaf"
        }
    ],
    "Msg": ""
}
{
    "Err": 1,
    "Data": "",
    "Msg": "Error 1062: Duplicate entry '[email protected]' for key 'email'"
}

sns-api-in-beego's People

Contributors

max-liu avatar

Stargazers

 avatar  avatar stanleylfc avatar Chris YU avatar 高考状元老乡 avatar  avatar shawn avatar wufeng avatar  avatar hiprice avatar  avatar mushishixian avatar Jiabei Yuan avatar SHIMIZU Taku avatar damon lin avatar

Watchers

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