Skip to content

Friends

Matthew Taylor edited this page Jan 12, 2016 · 1 revision

GET /users/:username/following

Returns a list of users that the specified user is following.

Request URL

https://api.scratch.mit.edu/users/:username/following

Request Parameters

  • :username – the username of the user for whom to get the following list

Optional URL Parameters

  • limit – integer value representing the number of users to limit the response to.
  • offset – integer value representing where in the list of who the user is following to start retrieving from. Users are returned in order of when they were most recently followed, so if offset=5, then the response will start with the 5th most recent person the user started following.

Example Request

curl -X GET "https://api.scratch.mit.edu/users/mres/following"
curl -X GET "https://api.scratch.mit.edu/users/mres/following?limit=2"

Example Response

[
    {
        "id":4373272,
        "username":"FunKitten2006",
        "history":{
            "joined":"2014-06-22T22:52:19.000Z",
            "login":"2015-12-04T15:50:56.000Z"
        },
        "profile":{
            "id":4373272,
            "avatar":"437/3272.png",
            "status":"I am working on making Scratch videos to help Scratchers. I now have a new studio called \nTutor Help Studio. I hope this will help a lot of kids on Scratch. Thank you Scratch Team and thanks  too you.","bio":"I love creating stuff on Scratch."
        }
    },
    {
        "id":11756170,
        "username":"cartoonnetwork",
        "history":{
            "joined":"2015-09-09T18:30:33.000Z",
            "login":"2015-12-04T15:27:05.000Z"
        },
        "profile":{
            "id":11756170,
            "avatar":"1175/6170.png",
            "status":"We’re working on our We Bare Bears projects: playing hide and seek with the bears, showing off our sweet b-ball moves, and creating interactive #bearstack stories! Have fun remixing our projects!","bio":"We’re home to a bunch of creative and fun programs like Adventure Time and We Bare Bears, that not only encourage kids to think outside the box, but way outside of their own world."
        }
    }
]

(IN DEVELOPMENT)

GET /users/:username/followers

Returns a list of users that follow the specified user.

Request URL

https://api.scratch.mit.edu/users/:username/followers

Request Parameters

  • :username – the username of the user for whom to get the followers list

Optional URL Parameters

  • limit – integer value representing the number of users to limit the response to.
  • offset – integer value representing where in the list of followers to start retrieving from. Users are returned in order of when they most recently followed the user, so if offset=5, then the response will start with the 5th most recent person to start following the user.

Example Request

curl -X GET "https://api.scratch.mit.edu/users/mres/followers"
curl -X GET "https://api.scratch.mit.edu/users/mres/followers?limit=2"
Clone this wiki locally