ref: master
./README.md
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# Marvel Comics Test This is a barebones Marvel's API demo. It'll fetch a given story (I've picked some random Silk's story) and display its name and list characters that are on that story with their photo. ## Running It's a pretty barebones sinatra application. You'll just need Ruby 3.0 and install sinatra itself. How to install the ruby version, depends on each environment. Some folks use rvm, some others rbenv. I personally just install via my system package manager (using apk), so that's an exercise for the reader. Lastly, you should be able to install sinatra's using rubygems: ```sh $ gem install sinatra ``` Then, to run the application, just run `rackup`. You have to set your personal Marvel API Key pair on `config/config.yml` before you can start running the application. Just copy the `.sample` file and you're good to go: ```sh $ cp config/config.yml.sample config/config.yml $ rackup ``` At this point you'll have the webserver running at `:9292`. ## TODO Or things I would do, if I had more time: - Caching API responses - Mapping the response into some struct, so no more messing with hashes directly ## License ISC License. Check COPYING for more detailed information. |