Coder Social home page Coder Social logo

2dspot's Introduction

API Document

POST

  1. GET Show all the posts

    /posts/
    

    Example response:

    [
      {
        "title": "Article 2The trustee must not take advantage.",
        "author": {
          "email": "kenda",
          "photoUrl": "http://inx.io/images/profilePictures/normal_905386.png",
          "_id": "51db755ca2c8ec7f7e000248",
          "__v": 0,
          "settings": {
            "privacy": false
          },
          "subscribes": [
            null
          ],
          "name": "kenda zwickl"
        },
        "body": "He used to be a mail carrier .This contract is null and void.",
        "_id": "51dc11cb06ed25e51300270a",
        "__v": 0,
        "meta": {
          "votes": 172
        },
        "pics": [
          "http://inx.io/images/uploads/21.jpg"
        ],
        "downVoters": [],
        "upVoters": [
          "51db755ca2c8ec7f7e0001f7",
          "51db755ca2c8ec7f7e0001f8",
          "51db755ca2c8ec7f7e0001f9",
          ...
        ],
        "date": "2013-07-29T15:00:00.000Z",
        "comments": [],
        "score": 187.52192009563387
      },
      ...
    ]
    
  2. GET Show all the posts

    /posts/user/:id/:page
    

    id - User ID
    page - The number of page of results

    Example response:

    {
      "next": true,
      "docs": [
        {
          "title": "I dare not touch the flower for its tenderness .",
          "author": "51db755ca2c8ec7f7e000248",
          "body": "The star is reportedly very ill .Mary will not...",
          "channel": {
            "name": "kuwait",
            "_id": "51db756b11bbae947e000072"
          },
          "_id": "51dc12c006ed25e5130083b5",
          "__v": 0,
          "meta": {
            "votes": -3
          },
          "pics": [
            "http://inx.io/images/uploads/30.jpg"
          ],
          "downVoters": [
            "51db755ca2c8ec7f7e00016c",
            "51db755ca2c8ec7f7e00016d",
            ...
          ],
          "upVoters": [
            "51db755ca2c8ec7f7e00012c",
            "51db755ca2c8ec7f7e00012e",
            ...
          ],
          "date": "2013-07-26T15:00:00.000Z"
        },
        ...
      ]
    }
    

2dspot's People

Contributors

loveson821 avatar centwave avatar

Watchers

 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.