diff options
author | IrlJidel <donal.diamond@gmail.com> | 2013-01-18 14:18:57 +0000 |
---|---|---|
committer | IrlJidel <donal.diamond@gmail.com> | 2013-01-18 14:18:57 +0000 |
commit | 055dc3a28428fb6914f02bab35933a4cea614731 (patch) | |
tree | 4230fcc286421c439f8df52bc5d2a84683773d58 /web/lib | |
parent | 1c332107b2fc68f997cee654cfcf18604ab55c9b (diff) | |
download | taginfo-055dc3a28428fb6914f02bab35933a4cea614731.tar taginfo-055dc3a28428fb6914f02bab35933a4cea614731.tar.gz |
Use rtype as param for api/4/relation/roles call
Was using type as param which is inconsistent with api/4/relation/stats call
Also example was using role as param which is incorrect
Diffstat (limited to 'web/lib')
-rw-r--r-- | web/lib/api/v4/relation.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/web/lib/api/v4/relation.rb b/web/lib/api/v4/relation.rb index 4982f07..73c5a15 100644 --- a/web/lib/api/v4/relation.rb +++ b/web/lib/api/v4/relation.rb @@ -5,7 +5,7 @@ class Taginfo < Sinatra::Base api(4, 'relation/roles', { :description => 'Member role statistics for a relation of given type.', :parameters => { - :type => 'Relation type (required).', + :rtype => 'Relation type (required).', :query => 'Only show results where the role matches this query (substring match, optional).' }, :paging => :optional, @@ -22,10 +22,10 @@ class Taginfo < Sinatra::Base [:count_relation_members, :INT, 'Number of members of type relation with this role.'], [:count_relation_members_fraction, :FLOAT, 'Number of members of type relation with this role devided by all members of type relation.'] ]), - :example => { :role => 'multipolygon', :page => 1, :rp => 10 }, + :example => { :rtype => 'multipolygon', :page => 1, :rp => 10 }, :ui => '/reports/relation_types#roles' }) do - rtype = params[:type] + rtype = params[:rtype] relation_type_info = @db.select('SELECT * FROM relation_types'). condition("rtype=?", rtype). |