REST API

People Manager

Documentation

Code Example

// JavaScript
var $REST = require("gd-sprest");
// Get the people manager
$REST.PeopleManager()
    // Get my properties
    .getMyProperties()
    // Execute the request
    .execute(function(myProps) {
        // Code goes here
    });

// TypeScript
import { PeopleManager } from "gd-sprest";

// Get the people manager
PeopleManager()
    // Get my properties
    .getMyProperties()
    // Execute the request
    .execute(myProps => {
        // Code goes here
    });

Properties

Name Type Description
EditProfileLink string The URL of the edit profile page for the current user.
IsMyPeopleListPublic boolean A Boolean value that indicates whether the current user’s People I’m Following list is public.

Methods

Name Description
amIFollowedBy(accountName:string) Checks whether the specified user is following the current user.
amIFollowing(accountName:string) Checks whether the current user is following the specified user.
follow(accountName:string) Adds the specified user to the current user’s list of followed users.
followTag(id:string) Adds the specified tag to the current user’s list of followed tags.
getFollowedTags(maxCount: number) Gets tags that the user is following.
getFollowersFor(accountName: string) Gets the people who are following the specified user.
getMyFollowers() Gets the people who are following the current user.
getMyProperties() Gets user properties for the current user.
getMySuggestions() Gets suggestions for who the current user might want to follow.
getPeopleFollowedBy(accountName:string) Gets the people who the specified user is following.
getPeopleFollowedByMe() Gets the people who the current user is following.
getPropertiesFor(accountName:string) Gets user properties for the specified user.
getTrendingTags() Gets the most popular tags. Static method.
getUserProfilePropertyFor(accountName:string, propName: string) Gets the specified user profile property for the specified user.
hideSuggestion(accountName:string) Removes the specified user from the user’s list of suggested people to follow.
isFollowing(possibleFollowerAccountName: string, possibleFolloweeAccountName: string) Checks whether the first user is following the second user.
setMyProfilePicture(stream: any) Uploads and sets the user profile picture. Users can upload a picture to their own profile only.
stopFollowing(accountName:string) Remove the specified user from the current user’s list of followed users.
stopFollowingTag(id: string) Remove the specified tag from the current user’s list of followed tags.