This week’s assignment was to work with an API and use loadJSON() function. I’ve worked on JavaScript fetch API and used await and async. I’ve created two apps for this week.
TEXT’N SPEECH
For one of my project I’ve used Web Speech API. Basically, Web Speech API makes web apps able to handle voice data. It provides two distinct functionality. One of them is speech recognition the other one is speech synthesis. I’ve worked on text to speech functionality and created an app where you can write whatever you want get the results in speech. You can also select a voice and accent.
Web's powerful scriptability, including the DOM and all of the related APIs and interfaces you can use to build Web content and apps.
Speech synthesis is accessed via the
SpeechSynthesis
interface, a text-to-speech component that allows programs to read out their text content (normally via the device's default speech synthesiser.) Different voice types are represented bySpeechSynthesisVoice
objects, and different parts of text that you want to be spoken are represented bySpeechSynthesisUtterance
objects. You can get these spoken by passing them to theSpeechSynthesis.speak()
method.
COVID 19 TRACKER APP USING ASYNC AWAIT AND FETCH API
For my second project, I’ve built a coronavirus (Covid19) tracker app. using async and await and fetch api. The idea is simple I’ve an input and you write the country name and click on get data button. As a result you can get the latest confirmed, recovered cases and number of deaths.
The API I’ve used for this project is covid19api which you can reach the documentation from here. Data is sourced from Johns Hopkins CSSE. John Hopkins University is one of the most trusted sources of COVID-19 data. We can say the relaying information is from a reputable source.
Covid-19 API is free and doesn’t require a subscribtion. This API allows you to follow the progress of the coronavirus around the world. Data returned includes the number of new, active, critical, recovered, and total cases by country. You can also get historical COVID-19 data filtered by country.
response