文章 List Friendship REST 端点

URLs

GET api/v1/users/{requestorid}/friends.xml (or .json)

LIST confirmed friends for a user by user id. Comments go here.

GET api/v1/users/{requestorid}/friends/pending.xml (or .json)

LIST pending friends for a user by user id.

GET api/v1/users/{requestorname}/friends.xml (or .json)

LIST confirmed friends for a user by username.

GET api/v1/users/{requestorname}/friends/pending.xml (or .json)

LIST pending friends for a user by username.

Request Parameters

名称

类型

描述

必需

默认值

选项

RequestorId

int?

Either the RequestorId or the RequestorName is required.

RequestorName

string

Either the RequestorId or the RequestorName is required.

FriendshipState

string

Defaults to Approved. Other options are Pending and NotSpecified.

Presence

string

Options are NotSpecified, Offline, Online.

RecipientId

int?

Allows filtering by RecipientId.

SortBy

string

Defaults to CreatedDate. Other options are LastModifiedDate, LastConversationDate, and User.

SortOrder

string

Defaults to Ascending. Other option is Descending.

PageSize

int?

Specify the number of results to return per page. If not set the default is 20. The max is 100.

PageIndex

int?

Specify the page number of paged results to return. Zero-based index. If not specified the default is 0.