Love Calculator

GRATUITO
Por Ajith Joseph | Atualizado לפני 13 ימים | Entertainment
Popularidade

9.7 / 10

Latência

451ms

Nível de serviço

97%

Health Check

N/A

Voltar para todas as discussões

A new Alexa Skill for your Love Calculator!

Rapid account: Shinesoftware 0 D C 2 J Zk A
shinesoftware-0dC2JZkA_
לפני 3 שנים

Hello,

I am trying to create an Alexa Skill using your Love Calculator but I have noticed some issue while request the information to your webservice.

I get the error: Unknown web method getPercentage

loveCalculator(fname, sname){

   const url = constant.RAPID_API_ENDPOINT;
   
   var config = {
       headers: { 
           'x-rapidapi-key': constant.RAPID_API_KEY,
           'x-rapidapi-host': constant.RAPID_API_HOST,
           'useQueryString': true,
           'Accept': 'application/json'
       },
       timeout: 6500, // timeout api call before we reach Alexa's 8 sec timeout, or set globally via axios.defaults.timeout
       data: {
           fname: encodeURIComponent(fname),
           sname: encodeURIComponent(sname)
       }
   };

   async function getJsonResponse(url, config){
       const res = await axios.get(url, config);
       return res.data;
   }

   return getJsonResponse(url, config).then((result) => {
       return result;
   }).catch((error) => {
       console.log(error);
       return null;
   });

}

I am using the nodeJS but I don’t understand why I get that error. I have also used the Postman and seems that there it works as well. Have you any idea?

thanks!

Rapid account: Shinesoftware 0 D C 2 J Zk A
shinesoftware-0dC2JZkA_ Commented לפני 3 שנים

Hello Aj,

have you localizated the result strings in other languages?

let me know!

regards,
Michelangelo

Rapid account: Shinesoftware 0 D C 2 J Zk A
shinesoftware-0dC2JZkA_ Commented לפני 3 שנים

Thanks Aj!
I have already solved! The Skill is quite completed.
I have to add some features and if you have some suggestion…

thanks

Rapid account: Ajith
ajith Commented לפני 3 שנים

Hi,

Please refer to below help document, There is no issues found with API and please let me know if you still facing issue to consume the API.

https://rapidapi.com/blog/how-to-use-an-api-with-node-js/

Thanks
Aj

Junte-se à discussão - adicione o comentário abaixo:

Efetue login / inscreva-se para postar novos comentários