11# Greetings API Documentation
22
3- Welcome to the Greetings API! This simple service allows you to retrieve greetings in various languages.
3+ Welcome to the Greetings API! This simple service allows you to retrieve greetings and farewells in various languages.
44
55## Using the REST API
66
7- The Greetings API provides two main endpoints for retrieving greetings:
7+ The Greetings API provides endpoints for retrieving both greetings and farewells :
88
99### Get a Random Greeting
1010
@@ -39,38 +39,72 @@ GET http://locahost:8080/french
3939}
4040```
4141
42+ ### Get a Random Farewell
43+
44+ ```
45+ GET http://locahost:8080/farewell
46+ ```
47+
48+ ** Example Response:**
49+ ``` json
50+ {
51+ "farewell" : " Goodbye, World!"
52+ }
53+ ```
54+
55+ ### Get a Farewell in a Specific Language
56+
57+ ```
58+ GET http://locahost:8080/farewell/{language}
59+ ```
60+
61+ Replace ` {language} ` with one of the supported language codes.
62+
63+ ** Example Request:**
64+ ```
65+ GET http://locahost:8080/farewell/french
66+ ```
67+
68+ ** Example Response:**
69+ ``` json
70+ {
71+ "farewell" : " Au revoir, Monde !"
72+ }
73+ ```
74+
4275## Supported Languages
4376
4477The API currently supports the following languages:
4578
46- | Language Code | Greeting |
47- | ---------------| ----------|
48- | english | Hello, World! |
49- | british | Hello, World! Cheers! |
50- | french | Bonjour, Monde ! |
51- | italian | Ciao, Mondo! |
52- | spanish | ¡Hola, Mundo! |
53- | german | Hallo, Welt! |
54- | mandarin | 你好,世界! |
55- | hindi | नमस्ते दुनिया! |
56- | arabic | مرحبا بالعالم! |
57- | bengali | ওহে বিশ্ব! |
58- | russian | Привет, мир! |
59- | portuguese | Olá, Mundo! |
60- | urdu | ہیلو، دنیا! |
61- | indonesian | Halo Dunia! |
62- | japanese | こんにちは世界! |
63- | marathi | नमस्कार जग! |
64- | telugu | హలో ప్రపంచం! |
79+ | Language Code | Greeting | Farewell |
80+ | ---------------| ----------| ---------- |
81+ | english | Hello, World! | Goodbye, World! |
82+ | british | Hello, World! Cheers! | Goodbye, World! Cheerio! |
83+ | french | Bonjour, Monde ! | Au revoir, Monde ! |
84+ | italian | Ciao, Mondo! | Arrivederci, Mondo! |
85+ | spanish | ¡Hola, Mundo! | ¡Adiós, Mundo! |
86+ | german | Hallo, Welt! | Auf Wiedersehen, Welt! |
87+ | mandarin | 你好,世界! | 再见,世界! |
88+ | hindi | नमस्ते दुनिया! | अलविदा दुनिया! |
89+ | arabic | مرحبا بالعالم! | وداعا يا عالم! |
90+ | bengali | ওহে বিশ্ব! | বিদায় পৃথিবী! |
91+ | russian | Привет, мир! | До свидания, мир! |
92+ | portuguese | Olá, Mundo! | Adeus, Mundo! |
93+ | urdu | ہیلو، دنیا! | الوداع، دنیا! |
94+ | indonesian | Halo Dunia! | Selamat tinggal Dunia! |
95+ | japanese | こんにちは世界! | さようなら世界! |
96+ | marathi | नमस्कार जग! | निरोप जग! |
97+ | telugu | హలో ప్రపంచం! | వీడ్కోలు ప్రపంచం! |
6598
6699## Using the Greetings Website
67100
68101If you prefer a web interface, you can visit the website at http://locahost:8081/ where you can:
69102
701031 . View random greetings with a simple click
71- 2 . Experience our user-friendly interface
104+ 2 . View random farewells with a simple click
105+ 3 . Experience our user-friendly interface
72106
73- Simply click the greeting button (👋) to get a new random greeting displayed on the screen.
107+ Simply click the greeting button (👋) to get a new random greeting or the farewell button (👋😢) to get a new random farewell displayed on the screen.
74108
75109## API Limits
76110
@@ -80,13 +114,20 @@ Currently, there are no rate limits on the API usage, but please be respectful o
80114
81115If you request a language that doesn't exist, the API will return an appropriate error message with a 400 status code.
82116
83- Example error response:
117+ Example error response for greeting :
84118``` json
85119{
86120 "error" : " no greeting found for language 'klingon'"
87121}
88122```
89123
124+ Example error response for farewell:
125+ ``` json
126+ {
127+ "error" : " no farewell found for language 'klingon'"
128+ }
129+ ```
130+
90131## Need Help?
91132
92133If you have any questions or need assistance with the Greetings API, please open an issue on our GitHub repository.
0 commit comments