diff options
author | Jochen Topf <jochen@topf.org> | 2013-01-07 09:34:12 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2013-01-07 09:34:12 +0100 |
commit | b14844558528208b17267d4761ec7655274e0e41 (patch) | |
tree | 63f9f3450e199d7e3c316f8d88f29986807e67ae /web | |
parent | 5cfd2edfe3cb42ff9b1f917769c3232e5a9d8bb2 (diff) | |
download | taginfo-b14844558528208b17267d4761ec7655274e0e41.tar taginfo-b14844558528208b17267d4761ec7655274e0e41.tar.gz |
Move site API call to site/info and add site/sources
Diffstat (limited to 'web')
-rw-r--r-- | web/lib/api/v4/site.rb | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/web/lib/api/v4/site.rb b/web/lib/api/v4/site.rb index e2fca6b..303e9c1 100644 --- a/web/lib/api/v4/site.rb +++ b/web/lib/api/v4/site.rb @@ -1,7 +1,7 @@ # web/lib/api/v4/site.rb class Taginfo < Sinatra::Base - api(4, 'site', { + api(4, 'site/info', { :description => 'Get information about this taginfo site.', :result => { :url => :STRING, @@ -20,4 +20,23 @@ class Taginfo < Sinatra::Base return data.to_json end + api(4, 'site/sources', { + :description => 'Get information about the data sources used.', + :result => { + :name => :STRING, + :data_until => :STRING, + :update_start => :STRING, + :update_end => :STRING + }, + :example => { }, + :ui => '/sources' + }) do + return Source.visible.map{ |source| { + :name => source.name, + :data_until => source.data_until, + :update_start => source.update_start, + :update_end => source.update_end + }}.to_json + end + end |