aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/lib/api/v4/site.rb21
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