DEV Community

Cover image for Front-end developer 🤓 Challenge🚀
Rajesh Joshi
Rajesh Joshi

Posted on

Front-end developer 🤓 Challenge🚀

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);
});
Enter fullscreen mode Exit fullscreen mode

response

{
   "detail": true
}
Enter fullscreen mode Exit fullscreen mode

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);
});
Enter fullscreen mode Exit fullscreen mode

response

{
   "passcode": "SECURE_PASSCODE",
   "data":{
      "text": "Hello, World!",
      "one_time_view": false
   }
}
Enter fullscreen mode Exit fullscreen mode

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!

Discussion (0)