Functions - friends

From The Socknet

Jump to: navigation, search

Functions - friends provides a list of a user's friends. Often this is used to determine mutual friends with another user or by a service to help identify what users might be mentioned in a message.

Specification

GET friends

->
{ 
  pagination: {
        pages: 1,
        results_per_page: 200,
        page_count: 1,
        results_count: 3
  },
  results: {
	"http://friend3.com": {
		relationships: ["friend"],
		isa: ["sailor", "card-shark"]
	},
	"http://mrleroy_thief.com": {
		relationships: ["spouse", "business partner"],
		verified: true
	},
	"http://mabelle.com": {
		verified: true
	}
  }
}

friends can be called via GET or POST. As usual, POST may give more information if a from field is included. Also, a POST is necessary in order to fetch non-default pages.

friends is subject to pagination.

The response has a results field which holds an object. The keys of this object are OpenID's. The values are objects.

Friend objects may have any fields that a call to profile may return.

Friend objects may have a relationships field which holds an array of strings describing the connection between the user and the friend.

Friend objects may have a verified field which holds a boolean. If this holds a true value, then the user is completely sure that the friend is who he claims to be.

Friend objects may have an isa field which holds an array of strings describing the friend according to the user.

Support

Providers must support this function.

Services have no use for this function.

Further Reading

Personal tools