From 564e4dd20d479d1ed27f439e1a0beb1da1a9e20b Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 25 Aug 2018 00:09:32 +0200 Subject: [PATCH] Improve "Usage" in the README and link to documentation --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8f85c86..e1024f9 100644 --- a/README.md +++ b/README.md @@ -37,25 +37,31 @@ Configure the engine in ```config/initializers/diaspora_federation.rb```: ```ruby DiasporaFederation.configure do |config| # the pod url - config.server_uri = AppConfig.pod_uri + config.server_uri = "http://localhost:3000" + + # ... other settings config.define_callbacks do on :fetch_person_for_webfinger do |diaspora_id| person = Person.find_local_by_diaspora_id(diaspora_id) if person DiasporaFederation::Discovery::WebFinger.new( - # ... + # ... copy person attributes to WebFinger object ) end end on :fetch_person_for_hcard do |guid| - # ... + # ... fetch hcard information end + + # ... other callbacks end end ``` +The available config settings can be found [here](https://www.rubydoc.info/gems/diaspora_federation/DiasporaFederation#class_attr_details) and the callbacks are listed [here](https://www.rubydoc.info/gems/diaspora_federation/DiasporaFederation#define_callbacks-class_method) in the gem documentation. + ## Contributing See [our contribution guide](/CONTRIBUTING.md) for more information on how to contribute to the diaspora\* federation library.