Skip to content
Snippets Groups Projects
Commit ca68d932 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

hook with api

parent d0b72284
No related branches found
No related tags found
No related merge requests found
class Api::Osuny::RootController < Api::ApplicationController
def index
@websites = current_university.communication_websites.in_production
end
def theme_released
# TODO check security
# TODO autoupdate
end
end
<% content_for :title, 'API' %>
<h2>Lhéo</h2>
<div class="row">
<div class="col-lg-6">
<div class="col-lg-6 mb-5">
<h2>Osuny</h2>
<p>
Lhéo est un <a href="http://lheo.gouv.fr/" target="_blank" rel="
">
Langage Harmonisé d'Échange d'informations sur l'Offre de formation.
</a>. L'API Osuny Lhéo met à disposition toute l'offre de formation à ce format.
L'API Osuny permet d'interagir avec une instance.
L'implémentation est très rudimentaire, n'hésitez pas à ouvrir <a href="https://github.com/noesya/osuny/issues" target="_blank" rel="noreferrer">une issue sur Github</a> pour signaler un manque.
</p>
<%= link_to 'API', api_osuny_path, class: 'btn btn-primary' %>
</div>
<div class="col-lg-6">
<%= link_to 'Accéder à l\'API Lhéo', api_lheo_path, class: 'btn btn-primary' %>
<div class="col-lg-6 mb-5">
<h2>LHÉO</h2>
<p>
LHÉO est le <a href="http://lheo.gouv.fr/" target="_blank" rel="noreferrer">Langage Harmonisé d'Échange d'informations sur l'Offre de formation.</a>.
L'API Osuny LHÉO met à disposition toute l'offre de formation à ce format.
L'implémentation est incomplète, n'hésitez pas à ouvrir <a href="https://github.com/noesya/osuny/issues" target="_blank" rel="noreferrer">une issue sur Github</a> pour signaler un manque.
</p>
<%= link_to 'API', api_lheo_path, class: 'btn btn-primary' %>
</div>
</div>
json.communication do
json.websites @websites.each do |website|
json.name website.name
json.url website.url
end
end
namespace :api do
get 'lheo' => 'lheo#index', defaults: { format: :xml }
namespace :osuny, defaults: { format: :json } do
get '/' => 'root#index'
get 'theme-released' => 'root#theme_released'
end
root to: 'dashboard#index'
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment