torrust_index_backend/web/api/v1/contexts/about/
mod.rs

1//! API context: `about`.
2//!
3//! This API context is responsible for providing metadata about the API.
4//!
5//! # Endpoints
6//!
7//! - [About](#about)
8//! - [License](#license)
9//!
10//! # About
11//!
12//! `GET /v1/about`
13//!
14//! Returns a html page with information about the API.
15//!
16//!
17//! **Example request**
18//!
19//! ```bash
20//! curl "http://127.0.0.1:3001/v1/about"
21//! ```
22//!
23//! **Example response** `200`
24//!
25//! ```html
26//! <html>
27//!     <head>
28//!         <title>About</title>
29//!     </head>
30//!     <body style="margin-left: auto; margin-right: auto; max-width: 30em;">
31//!         <h1>Torrust Index Backend</h1>
32//!
33//!         <h2>About</h2>
34//!
35//!         <p>Hi! This is a running <a href="https://github.com/torrust/torrust-index-backend">torrust-index-backend</a>.</p>
36//!     </body>
37//!     <footer style="padding: 1.25em 0; border-top: dotted 1px;">
38//!         <a href="/v1/about/license">license</a>
39//!     </footer>
40//! </html>
41//! ```
42//!
43//! # License
44//!
45//! `GET /v1/about/license`
46//!
47//! Returns the API license.
48//!
49//! **Example request**
50//!
51//! ```bash
52//! curl "http://127.0.0.1:3001/v1/about/license"
53//! ```
54//!
55//! **Example response** `200`
56//!
57//! ```html
58//! <html>
59//!     <head>
60//!         <title>Licensing</title>
61//!     </head>
62//!     <body style="margin-left: auto; margin-right: auto; max-width: 30em;">
63//!         <h1>Torrust Index Backend</h1>
64//!
65//!         <h2>Licensing</h2>
66//!
67//!         <h3>Multiple Licenses</h3>
68//!
69//!         <p>
70//!             This repository has multiple licenses depending on the content type, the date of contributions or stemming from external component licenses that were not developed by any of Torrust team members or Torrust repository
71//!             contributors.
72//!         </p>
73//!
74//!         <p>The two main applicable license to most of its content are:</p>
75//!
76//!         <p>- For Code -- <a href="https://github.com/torrust/torrust-index-backend/blob/main/licensing/agpl-3.0.md">agpl-3.0</a></p>
77//!
78//!         <p>- For Media (Images, etc.) -- <a href="https://github.com/torrust/torrust-index-backend/blob/main/licensing/cc-by-sa.md">cc-by-sa</a></p>
79//!
80//!         <p>If you want to read more about all the licenses and how they apply please refer to the <a href="https://github.com/torrust/torrust-index-backend/blob/develop/licensing/contributor_agreement_v01.md">contributor agreement</a>.</p>
81//!     </body>
82//!     <footer style="padding: 1.25em 0; border-top: dotted 1px;">
83//!         <a href="/v1/about">about</a>
84//!     </footer>
85//! </html>
86//! ```
87pub mod handlers;
88pub mod routes;