marvel_api_example

Version, currently master branch1 version
  • master branchlatestJun 21, 2018

github.com/laginha87/marvel_api_example

No description declared in shard.yml.

2 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  marvel_api_example:
    github: laginha87/marvel_api_example
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
0.24.1
License
MIT
Author
unnamed author
Target
  • marvel_api_example from src/marvel.cr

Dependencies

Runtime Dependencies

  • dotenv*github: gdotdesign/cr-dotenv

README

marvel_api_example

This is a sample app I built as a companion to this blog post

Installation

  1. If you don't have crystal set up follow the instructions from the crystal wiki
  2. Create an account in https://developer.marvel.com/docs and get your own keys
  3. shards install
  4. cp .env.example .env and place your keys in the .env file

Usage

Run shards build to build the binary then run it with from bin/marvel_api_example. The program takes a bit to finish because the api requests are really long, the requests then get cached into the cache folder.

If you get an invalid request because the keys are wrong or something like that, you need to clear the cache folder before running again.

Contributing

  1. Fork it ( https://github.com/laginha87/marvel_api_example/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors