Pokemon Shakespeare SDK
A library to display pokemon with Shakespearean descriptions
Dependencies
- Java 11
- Retrofit
- Picasso
- Material
- Appcompat
Usage
Create Client
To retrieve Pokemon data you first need to create a PokemonShakespeareClient
val client = PokemonShakespeareClient()
Get Shakespearean Description
val description = client.getDescription()
Get Sprite
val sprite = client.getSprite()
Each sprite can contain several images but only the default images are guaranteed.
Pokemon View
<com.challenge.pokemonshakespeare.views.PokemonView
android:id="@+id/pokemonView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:pokemon_name="Pikachu"
app:pokemon_description="Description of this pokemon"
app:pokemon_sprite="https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/100.png"/>
Architecture
The SDK uses repositories to fetch data from the PokeAPI and funtranslations API via retrofit. A
client class is used to share access to the required functionality for integration into other apps.
App
Dependencies
- Hilt
- Appcompat
- ViewModel
- LiveData
- Material
- ConstraintLayout
Architecture
The app uses a MVVM architecture. Data is fetched from repositories which use the
PokemonShakespeareClient to retrieve data. A viewmodel provides the data for the UI and an Activity
displays the data and interaction with the view.