Friends

Introduction

Friends help motivate each other.

Feed

Because a user's friend network (formerly known as a "street team") can grow very large, friendship information is divided into pages, where each page contains information for up to 25 friends. Each page has the following structure:

Content-Type
application/vnd.com.runkeeper.TeamFeed+json
Field Type Description
size Integer The total number of friends (i.e., across all pages)
items Item[] An array of up to 25 elements, with one element per friend
next String The URI for the next page of friends (omitted from the last page)

Friends

Detailed information about a friend has the following structure:

Content-Type
application/vnd.com.runkeeper.Member+json
Field Type Description
userID Integer The unique ID for the friend
name String The friend's full name
profile String The URL of the friend's public, human-readable profile on the RunKeeper website
status String One of the following value: pending, member

Friend Invitations

Invitations to become a friend have the following structure:

Content-Type
application/vnd.com.runkeeper.Invitation+json
Field Type Description
userID Integer The ID of the user to invite

Replies

Replies to an invitation have the following structure:

Array Structures

items

Content-Type
application/vnd.com.runkeeper.Reply+json
Field Type Description
reply String One of the following values: accepted, declined, ignored
Field Type Description
userID Integer The unique ID for the friend
name String The friend's full name
profile String The URL of the friend's public, human-readable profile on the RunKeeper website
uri String A URI for detailed information about the friend, including membership status

Supported Operations

Retrieving Friendship Information

To retrieve a user's friends, GET the URI for the friend resource.

Inviting Friends

To invite a user to be friends, POST to the URI for the friend resource, supplying the ID of the invited user. The system will return the URI of the detailed information for the invited user.