diff --git a/New_APIs/Unit_Convertor_API/README.md b/New_APIs/Unit_Convertor_API/README.md new file mode 100644 index 0000000..87f93c4 --- /dev/null +++ b/New_APIs/Unit_Convertor_API/README.md @@ -0,0 +1,35 @@ +# 🔄 Unit Converter API + +## Overview + +The **Unit Converter API** provides functionality to convert between different units of measurement, such as length, weight, temperature, and more. This API allows developers to integrate unit conversion features into their applications easily. + +## Features + +- **Length Conversion**: Convert between units of length, such as meters, kilometers, feet, and inches. +- **Weight Conversion**: Convert between units of weight, such as grams, kilograms, pounds, and ounces. +- **Temperature Conversion**: Convert between temperature units, such as Celsius, Fahrenheit, and Kelvin. +- **Customizable**: Convert between various other units based on the API’s capabilities. + +## Getting Started + +### Prerequisites + +- **API Key**: You will need an API key to access the Unit Converter API. Obtain an API key by [signing up](https://unitconvertapi.com/) on the Unit Converter API website. + +### Installation + +To use the Unit Converter API in a web application, follow these steps: + +1. **Obtain Your API Key**: After signing up, you will receive an API key. + +2. **Make API Requests**: Use the API key to authenticate your requests to the Unit Converter API endpoint. + +3. **Sample Request**: + ```bash + curl -X GET "https://api.unitconvertapi.com/v1/convert?from=meters&to=feet&amount=10" \ + -H "Authorization: Bearer YOUR_API_KEY" + + +### contributor +### Amrutha Pariprolu \ No newline at end of file diff --git a/New_APIs/Unit_Convertor_API/index.html b/New_APIs/Unit_Convertor_API/index.html new file mode 100644 index 0000000..6db5dae --- /dev/null +++ b/New_APIs/Unit_Convertor_API/index.html @@ -0,0 +1,40 @@ + + + + +
+ + +${amount} ${fromUnit} is equal to ${data.result} ${toUnit}
+ `; + } else { + resultContainer.innerHTML = 'Conversion failed. Please check your input and try again.
'; + } + }) + .catch(error => { + console.error('Error fetching conversion results:', error); + const resultContainer = document.getElementById('result'); + resultContainer.innerHTML = 'An error occurred while fetching conversion results.
'; + }); + } +}); diff --git a/New_APIs/Unit_Convertor_API/manifest.json b/New_APIs/Unit_Convertor_API/manifest.json new file mode 100644 index 0000000..4485ea0 --- /dev/null +++ b/New_APIs/Unit_Convertor_API/manifest.json @@ -0,0 +1,20 @@ +{ + "name": "Unit Converter API App", + "short_name": "Unit Converter App", + "start_url": "/", + "display": "standalone", + "background_color": "#ffffff", + "theme_color": "#000000", + "icons": [ + { + "src": "icons/icon-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/icon-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} diff --git a/New_APIs/Unit_Convertor_API/package-lock.json b/New_APIs/Unit_Convertor_API/package-lock.json new file mode 100644 index 0000000..b93df1c --- /dev/null +++ b/New_APIs/Unit_Convertor_API/package-lock.json @@ -0,0 +1,13 @@ +{ + "name": "unit-converter-api-app", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "unit-converter-api-app", + "version": "1.0.0", + "license": "MIT" + } + } +} diff --git a/New_APIs/Unit_Convertor_API/package.json b/New_APIs/Unit_Convertor_API/package.json new file mode 100644 index 0000000..740c922 --- /dev/null +++ b/New_APIs/Unit_Convertor_API/package.json @@ -0,0 +1,17 @@ +{ + "name": "unit-converter-api-app", + "version": "1.0.0", + "description": "A simple web app that integrates with Unit Converter API for unit conversion functionality.", + "main": "index.js", + "scripts": { + "start": "echo 'No start script defined'" + }, + "keywords": [ + "unit", + "converter", + "api", + "web" + ], + "author": "Amrutha", + "license": "MIT" +} diff --git a/New_APIs/Unit_Convertor_API/styles.css b/New_APIs/Unit_Convertor_API/styles.css new file mode 100644 index 0000000..39be748 --- /dev/null +++ b/New_APIs/Unit_Convertor_API/styles.css @@ -0,0 +1,50 @@ +body { + font-family: Arial, sans-serif; + background-color: #f5f5f5; + margin: 0; + padding: 0; + display: flex; + flex-direction: column; + align-items: center; +} + +header { + background-color: #000; + color: #fff; + width: 100%; + text-align: center; + padding: 10px; +} + +main { + margin-top: 20px; + width: 80%; + max-width: 800px; +} + +#conversion-form { + display: flex; + flex-direction: column; + align-items: center; +} + +input, select, button { + margin: 10px; + padding: 10px; + border: 1px solid #ccc; + border-radius: 4px; +} + +button { + background-color: #007bff; + color: #fff; + cursor: pointer; +} + +button:hover { + background-color: #0056b3; +} + +#result { + margin-top: 20px; +}