Functions - profile

From The Socknet

(Redirected from User Data)
Jump to: navigation, search

profile is used to get details about the user.

Contents

Specification

GET profile

->
{ name: "David Granger",
  email: "mooboy@cool_attack.com"
  sex: "male"
}

profile may be called via GET or POST.

The response should include a name field holding a string.

The response should include an email field holding a string.

The response should include a profile field holding a string with a URL to a webpage describing the user.

The response may include an images field holding an array of objects with width, height, and url fields describing images. This field is not required by highly suggested.

The response may include a sex field holding a string.

The response may include a languages field holding an array of strings describing HTTP language tags.

The response may include an isa field holding an array of strings describing the user.

The response may include a public_keys field holding an array of objects having an algorithm field and algorithm-specific information.

The response may include a foaf field holding a string with a URL to a FOAF file.

The response may include an xrd field holding a string with a URL to an XRD file.

The response may include a xfn field holding a string with a URL to an XFN file.

Specification as Object

{ name: ... the user's human name ...,
  email: ... the user's email address ...,
  sex: ... gender (male, female, etc) ...,
  profile: ... URL to the user's publicly viewable profile ...,
  languages: [ ... HTTP language tags in order of preference ... ],
  isa: [ ... anything the user is (scientist, cat lover, etc) ... ],
  images: [
    { width: ..., height: ..., url: ... },
    ... images of this user in various sizes ...
  ],
  public_keys: [
    { algorithm: "rsa", key: ... the user's RSA public key ...},
    ... the user's other public keys ...
  ],
  foaf: ... URL to a FOAF document ...,
  xrd: ... URL to an XRD document ...,
  xfn: ... URL to an XFN document ...
  ...
}

Support

Providers must support this function.

Services have no use for this function.

Further Reading

More Information

The GET form only returns data the user has chosen to make public. The POST form will often return more data if the caller is a friend.

It is a good idea to provide images with certain ratios, such as 1x1 and 1x2, which readers may compare to choose the best to show. Some will just use the first one, so make that your preferred image.

HTTP language tags: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.10

URL's are subject to URL Processing.

It should be understood that a friend might pass this information on to other parties via the friends even though it is disrespectful of your privacy.

Personal tools