update documentation

This commit is contained in:
Benjamin Neff 2015-07-02 02:32:22 +02:00
parent 99d5ffdc04
commit a70e2861fa

View file

@ -12,55 +12,80 @@ module DiasporaFederation
## ##
# the pod url # the pod url
# #
# Example: # @example with uri
# config.server_uri = URI("http://localhost:3000/") # config.server_uri = URI("http://localhost:3000/")
# or # @example with configured pod_uri
# config.server_uri = AppConfig.pod_uri # config.server_uri = AppConfig.pod_uri
attr_accessor :server_uri attr_accessor :server_uri
## ##
# the class to use as +Person+ # the class to use as +Person+
# #
# Example: # @example
# config.person_class = Person.to_s # config.person_class = Person.to_s
# #
# This class must have the following methods: # This class must have the following class methods:::
# #
# *find_local_by_diaspora_handle* # +find_local_by_diaspora_handle+:
# This should return a +Person+, which is on this pod and the account is not closed. # This should return a +Person+, which is on this pod and the account is not closed.
# #
# *find_local_by_guid* # +find_local_by_guid+:
# This should return a +Person+, which is on this pod and the account is not closed. # This should return a +Person+, which is on this pod and the account is not closed.
# #
# *webfinger_hash* # This class must have the following instance methods or attributes:::
# This should return a +Hash+ with the following information:
# {
# acct_uri: "acct:user@server.example",
# alias_url: "https://server.example/people/0123456789abcdef",
# hcard_url: "https://server.example/hcard/users/0123456789abcdef",
# seed_url: "https://server.example/",
# profile_url: "https://server.example/u/user",
# atom_url: "https://server.example/public/user.atom",
# salmon_url: "https://server.example/receive/users/0123456789abcdef",
# guid: "0123456789abcdef",
# pubkey: "-----BEGIN PUBLIC KEY-----\nABCDEF==\n-----END PUBLIC KEY-----"
# }
# #
# *hcard_profile_hash* # +diaspora_handle+: the diaspora handle
# This should return a +Hash+ with the following information: # "user@server.example"
# { #
# guid: "0123456789abcdef", # +nickname+: the username on the pod
# nickname: "user", # "user"
# full_name: "User Name", #
# url: "https://server.example/", # +guid+: the guid
# photo_large_url: "https://server.example/uploads/f.jpg", # "0123456789abcdef"
# photo_medium_url: "https://server.example/uploads/m.jpg", #
# photo_small_url: "https://server.example/uploads/s.jpg", # +public_key+: the public key of the person (DER-encoded PKCS#1 key)
# pubkey: "-----BEGIN PUBLIC KEY-----\nABCDEF==\n-----END PUBLIC KEY-----", # "-----BEGIN PUBLIC KEY-----
# searchable: true, # ABCDEF==
# first_name: "User", # -----END PUBLIC KEY-----"
# last_name: "Name" #
# } # +searchable+: if the person is searchable by name
# true
#
# +alias_url+: alias url to the profile
# "https://server.example/people/0123456789abcdef"
#
# +hcard_url+: url to the hcard
# "https://server.example/hcard/users/0123456789abcdef"
#
# +seed_url+: pod url
# "https://server.example/"
#
# +profile_url+: url to the profile
# "https://server.example/u/user"
#
# +atom_url+: url to the atom rss feed
# "https://server.example/public/user.atom"
#
# +salmon_url+: private receive url for salmon
# "https://server.example/receive/users/0123456789abcdef"
#
# +photo_large_url+: large photo
# "https://server.example/uploads/l.jpg"
#
# +photo_medium_url+: medium photo
# "https://server.example/uploads/m.jpg"
#
# +photo_small_url+: small photo
# "https://server.example/uploads/s.jpg"
#
# +full_name+: full name
# "User Name"
#
# +first_name+: first name
# "User"
#
# +last_name+: last name
# "Name"
attr_accessor :person_class attr_accessor :person_class
def person_class def person_class
const_get(@person_class) const_get(@person_class)