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
double_damage_from | double damage from | double_damage_from | super effective against | super effective to | very effective against | weakness of | |
---|---|---|---|---|---|---|---|
double_damage_to | double damage against | double damage to | double_damage_to | strong against | |||
half_damage_from | half damage from | half_damage_from | not so effective against | not very effective against | not very effective to | ||
half_damage_to | half damage against | half damage to | half_damage_to | ||||
no_damage_from | no damage against | no damage from | no effect against | no_damage_from | resistant against | resistant to | |
no_damage_to | has no damage to | has zero damage to | no effect to | no_damage_to |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 4 columns, instead of 3. in line 1.
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
"abilities","abilities","ability","skill" | |
"description","about","description" | |
"moves","attack","move","moves" | |
"photo","image","sprite" |
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
cd server | |
nodemon server.js | |
~/ngrok http 5000 |
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
react-native run-android | |
react-native run-ios |
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
export const dialogflowConfig = { | |
"type": "service_account", | |
"project_id": "XXX-XXXX-XXXX", | |
"private_key_id": "XXXXX", | |
"private_key": "-----BEGIN PRIVATE KEY----XXXXX\n-----END PRIVATE KEY-----\n", | |
"client_email": "dialogflow-XXXX@XXXXX-XXX-XXXX.iam.gserviceaccount.com", | |
"client_id": "XXXXXXXXXX", | |
"auth_uri": "https://accounts.google.com/o/oauth2/auth", | |
"token_uri": "https://oauth2.googleapis.com/token", | |
"auth_provider_xxxx_cert_url": "https://www.googleapis.com/oauth2/v1/certs", |
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
git clone https://github.com/anchetaWern/RNPokedexBot.git | |
cd RNPokedexBot | |
git checkout starter | |
yarn | |
react-native eject | |
react-native link react-native-dialogflow | |
react-native link react-native-voice | |
react-native run-android | |
react-native run-ios |
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
const PORT = 5000; | |
app.listen(PORT, (err) => { | |
if (err) { | |
console.error(err); | |
} else { | |
console.log(`Running on ports ${PORT}`); | |
} | |
}); |
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
if (get_type_effectiveness) { | |
const pokemon_type = parameters.pokemon_types; | |
let type_effectiveness = parameters.type_effectiveness; | |
const type_effectiveness_formatted = type_effectiveness.replace(/_/g, ' '); | |
const type_effectiveness_word = outputContexts[0].parameters['type_effectiveness.original']; | |
let from_or_to = type_effectiveness.split('_')[2]; | |
const pokemon_type_comes_first = (queryText.indexOf(pokemon_type) < queryText.indexOf(type_effectiveness_word)) ? true : false; |
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
if (pokemon_species_endpoint.indexOf(specs) !== -1 || intent.displayName == 'evolution') { | |
const { data } = await axios_instance.get(`/pokemon-species/${pokemon}`); | |
const evolution_chain_id = data.evolution_chain.url.split('/')[6]; | |
const text = data.flavor_text_entries.find(item => { | |
return item.language.name == 'en'; | |
}); | |
let fulfillmentText; |
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
if (pokemon_endpoint.indexOf(specs) !== -1) { | |
const { data } = await axios_instance.get(`/pokemon/${pokemon}`); | |
let fulfillmentText; | |
const id = String(data.id).padStart(3, '0'); | |
const value = (specs == 'abilities') ? data.abilities.map(item => item.ability.name).join(', ') : data.moves.map(item => item.move.name).join(', '); | |
fulfillmentText = `The ${specs} of ${pokemon} are: ${value}`; | |
Object.assign(response_obj, { fulfillmentText }); |