summaryrefslogtreecommitdiff
path: root/lib/nickserver/nicknym/source.rb
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-08-30 12:38:43 +0200
committerAzul <azul@riseup.net>2016-08-31 12:14:52 +0200
commit625416ac16a1216240fc4c48aa19802ef8a967a1 (patch)
treef3a4a54627fcae49bf896f5f58e60b506f9a55d4 /lib/nickserver/nicknym/source.rb
parentb22e23eb9f5a1cb3e37ab2a26b1091183574f4e4 (diff)
wip: key lookup by address via leaps nicknym
I added a RequestHandler that uses Nicknym::Source - but that has not been implemented yet.
Diffstat (limited to 'lib/nickserver/nicknym/source.rb')
-rw-r--r--lib/nickserver/nicknym/source.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/nickserver/nicknym/source.rb b/lib/nickserver/nicknym/source.rb
new file mode 100644
index 0000000..1be0c2a
--- /dev/null
+++ b/lib/nickserver/nicknym/source.rb
@@ -0,0 +1,14 @@
+require 'nickserver/source'
+
+module Nickserver
+ module Nicknym
+ class Source < Nickserver::Source
+
+ def available_for?(domain)
+ status, _body = adapter.get "https://#{domain}/provider.json"
+ status == 200
+ end
+
+ end
+ end
+end