get('/', function(Request $request, SilexApplication $app) { $apiAdapter = new \API_V1_adapter($app); $result = new \API_V1_result($request, $apiAdapter); return $result->set_datas(array( 'name' => $app['phraseanet.registry']->get('GV_homeTitle'), 'type' => 'phraseanet', 'description' => $app['phraseanet.registry']->get('GV_metaDescription'), 'documentation' => 'https://docs.phraseanet.com/Devel', 'versions' => array( '1' => array( 'number' => $apiAdapter->get_version(), 'uri' => '/api/v1/', 'authenticationProtocol' => 'OAuth2', 'authenticationVersion' => 'draft#v9', 'authenticationEndPoints' => array( 'authorization_token' => '/api/oauthv2/authorize', 'access_token' => '/api/oauthv2/token' ) ) ) ))->get_response(); }); return $app; }, isset($environment) ? $environment : null);