-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
40637cc
commit 21982e7
Showing
2 changed files
with
39 additions
and
3 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
front/src/routes/integrations/gunganTranslatorNRM/+page.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<script> | ||
import axios from 'axios'; | ||
import { onMount } from "svelte"; | ||
import { Container } from "@sveltestrap/sveltestrap"; | ||
let translation = []; | ||
async function fetchGunganTranslation() { | ||
try { | ||
// console.log(inputSentence); | ||
const options = { | ||
method: 'GET', | ||
url: 'https://gungan.p.rapidapi.com/gungan.json', | ||
params: { | ||
text: 'You came to my home and I said okay!' | ||
}, | ||
headers: { | ||
'X-RapidAPI-Key': '88a523cd96msh3544e0ee37800ebp1845b1jsnf31a7971dadb', | ||
'X-RapidAPI-Host': 'gungan.p.rapidapi.com' | ||
} | ||
}; | ||
const response = await axios.request(options); | ||
console.log(response); | ||
console.log(response.data); | ||
} catch (error) { | ||
console.log(`Error -> ${error}`); | ||
} | ||
} | ||
onMount(() => { | ||
fetchGunganTranslation(); | ||
}) | ||
</script> | ||
|
||
<Container> | ||
Loading... | ||
|
||
</Container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters