holderdeord/hdo-site

View on GitHub
app/representers/api/root_representer.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Api
  class RootRepresenter < BaseRepresenter
    link(:self)            { api_root_url }
    link(:license)         { {href: "http://creativecommons.org/licenses/by-sa/3.0/no/", type: 'text/html'} }

    # hdo
    link(:issues)          { api_issues_url }
    link(:promises)        { api_promises_url }
    link(:propositions)    { api_propositions_url }

    # parliament
    link(:representatives) { api_representatives_url }
    link(:parties)         { api_parties_url }
    link(:committees)      { api_committees_url }
    link(:districts)       { api_districts_url }
    link(:votes)           { api_votes_url }
  end
end