Git Product home page Git Product logo

squirrel-degrees's Introduction

6 Degrees of Squirrel Girl

Why?

This is a parody of 6 Degrees of Kevin Bacon using the Marvel universe with Squirrel Girl as our "Kevin Bacon". It was intended to explore MarvelQL by Novvum but ended up relying mostly on the original Marvel REST API.

This project was created for my GraphQSquirrel talk at elm-conf 2019. You can find the slides and recording listed in my presentations repo.

Development

Setting up your api keys

  1. Sign up for an account through the Marvel developer portal.

  2. At the root of the project, run cp src/Secrets.elm.template src/Secrets.elm to duplicate the Secrets template file.

  3. Open src/Secrets.elm and fill in your private and public api keys found in your account details. This Secrets.elm file is ignored in the .gitignore so no worries.

Running the project

Make sure you've first followed Setting up your api keys.

  1. If you don't already have elm installed, follow the install instructions from the elm-lang guide.

  2. Install dependencies through npm install.

  3. Generate the GraphQL client by running npm run api:gen from the root of the project.

  4. Run elm reactor.

  5. Navigate to http://localhost:8000/src/Main.elm to see the app running! Have fun!

Running the tests

This project doesn't have enough tests because I was lazy but there are some tests!

  1. Install elm-explorations/test globally by running npm install -g elm-test

  2. Run elm-test or npm run test.

Two main issues

  • Currently does not deal with paginating through API responses--would also require rethinking of when a degree has been completely searched since I currently use an empty PendingComics queue to mean it's time to step to the next degree
  • Currently does not correctly fill in the working graph from the cache past the first degree--only fills in the first degree and thinks it is done. Probably need to just reload PendingComics appropriately but the first degree is handled by one function and the rest of the degrees are handled by another function (since one is from /comics and the other is from /comics/#{id}/character)

Other Resources

squirrel-degrees's People

Contributors

glitteringkatie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.