文章 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.

否