This content originally appeared on DEV Community and was authored by Rajesh Joshi
Web Development is one of the most coveted fields in today’s tech world. As the internet spreads its roots in every corner of the world, the need for highly interactive and responsive websites is ever-increasing.
Challenge for Front-end Developers 🤓
Create a Text Compression Application (either Web-App or Native App, it's all up to you) using Rapid API. The application should have all features that are provided by the Rapid API, like-
- Setting Passcode
- Saving JSON Data
- Time To Live or ttl functionality
- One Time Read
Read the Rapid API Documentation here.
API Usage Example
Once you have Successfully Subscribed for the Free Plan, you can try it out on the API Playground.
Following is an example in JavaScript.
Saving Data
var axios = require("axios").default;
var options = {
method: 'POST',
url: 'https://text-compression.p.rapidapi.com/',
headers: {
'content-type': 'application/json',
'x-rapidapi-host': 'text-compression.p.rapidapi.com',
'x-rapidapi-key': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
},
data: {
passcode: 'SECURE_PASSCODE',
data: {text: 'Hello, World!'},
ttl: 120,
one_time_view: false
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});
response
{
"detail": true
}
Fetching Data
var axios = require("axios").default;
var options = {
method: 'GET',
url: 'https://text-compression.p.rapidapi.com/SECURE_PASSCODE',
headers: {
'x-rapidapi-host': 'text-compression.p.rapidapi.com',
'x-rapidapi-key': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});
response
{
"passcode": "SECURE_PASSCODE",
"data":{
"text": "Hello, World!",
"one_time_view": false
}
}
Future Scope 🚀
You may use the Rapid API Service for FREE initially. Host your front-end application freely on netlify, once you have traffic on your application, go for Pro or Ultra plans 💪🏻 on Rapid API and monetize 🤑 your application.
Challenge Accepted?
Drop a Comment, saying Challenge Accepted 😏. Once you finish the application, share the Link in the same thread.
All the Participation will be listed below.
Participation
-
-
Happy Coding 🤓
Cheers!
This content originally appeared on DEV Community and was authored by Rajesh Joshi
Rajesh Joshi | Sciencx (2022-02-09T12:06:54+00:00) Front-end developer 🤓 Challenge🚀. Retrieved from https://www.scien.cx/2022/02/09/front-end-developer-%f0%9f%a4%93-challenge%f0%9f%9a%80/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.