Code Monkey home page Code Monkey logo

j24-giphy's Introduction

Giphy API

This small Laravel app interacts with the Giphy API

Environment Variables from Giphy (self documenting names, hopefully!) GIPHY_API_KEY GIPHY_API_BASE_PATH

Testing methods are being implemented to show SOME true TDD, but due to time restrictions these will only really be fixed and the app actually passes it's own unit tests once I do a refactor branch to do some true tests that use mocking/stubs.

Task 1 Completed (hit an endpoint, display all the most recent data cached to one hour)

You can get this from the landing page. There's nothing pretty here: the app route sends it to a controller that fetches the data and dumps it out in a blade template.

Task 2 Completed (search function)

I set it as an option url parameter that's passed into the API wrapper. Again, it dumps out. In fact, because it does the same thing, I should really merge the view template in these two tasks.

Task 3 Sort-Of Completed (persist random endpoint)

The spec asks for "multiple tables", so I had two tables logically defined with a 1-2-1 relationship, which I would have had to do anyway as the image payload is a fairly complex structured JSON. It looks from later on that the spec actually wants the model to rotate between dynamic tables which is a bizarre fudge that I don't really see why you'd want to do that. But we'll get to that

EDIT: CTO confirmed that it's not rotating models. Huzzah!

Task 4 Completed (stored procedure)

You can find the raw SQL for this in resources/sql/task4.sql. Happy record traversing!

Task 5 Completed (JS search for stored entities)

The route/js-search takes you into a Vue app. There's a single search component that has a bound data property, hitting search then returns a json payload (that should be cached but isn't right now, that's demonstrated elsewhere) and renders it. The images are quite sizable: a front end cache like Varnish would be nice here.

Ideally I would create a reusable component here that takes a prop of "gifs" to render them out.

I didn't actually do the last task set because it effectively does the same thing: render out local entities with JS.

j24-giphy's People

Contributors

dependabot[bot] avatar secondejk avatar

Watchers

 avatar  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.