| Crates.io | poke-speare |
| lib.rs | poke-speare |
| version | 0.1.1 |
| created_at | 2020-07-12 20:57:08.109956+00 |
| updated_at | 2020-07-12 21:26:39.101883+00 |
| description | Pokemon descriptions by William Shakespeare. You know you need it. |
| homepage | |
| repository | https://github.com/MarcoIeni/poke-speare |
| max_upload_size | |
| id | 264489 |
| size | 121,125 |
REST API that, given a Pokémon name, returns its description in Shakespeare's style.
Pokemon description is taken from PokéAPI and it is converted by using Shakespeare translator.
You can use poke-speare both as a web server and as a rust library
$ curl http://localhost:5000/pokemon/charizard
{
"name": "charizard",
"description": "Charizard flies 'round the sky in search of powerful opponents."
}
let shakespeare_api_token = None;
let pokemon_descr = poke_speare::get_description("charizard", shakespeare_api_token).await;
println!("description: {}", pokemon_descr);
cargo install poke-speare$ docker pull marcoieni/poke-speare
Make sure that ~/.cargo/bin is in your PATH.
$ poke-speare
$ docker run -p 5000:5000 marcoieni/poke-speare
You can set environment variable in order to change settings. For example:
$ RUST_LOG=debug POKE_SPEARE_PORT=5001 poke-speare
In the following there are all environment variables with their default values:
RUST_LOG: error. Other possible values: infoPOKE_SPEARE_HOST: "127.0.0.1"POKE_SPEARE_PORT: 5000POKE_SPEARE_SHAKESPEARE_TOKEN: "".
Shakespeare translator
has a rate limit of 60 API calls a day with distribution of 5 calls an hour.
Set the environment variable POKE_SPEARE_SHAKESPEARE_TOKEN if you have a
FunTranslations Api Secret.Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.