Git Product home page Git Product logo

slim-lastfm's Introduction

Lastfm app demo in slim

Install

You'll need to have composer installed on your system.

Then run:

composer install

Then create a config.yml; use config.dist.yml as a guide.

We use the robo task runner to handle some common taks. To List commands:

vendor/bin/robo list

To start a dev server (php -S):

vendor/bin/robo server:start [<port>]

You should be able to point your browser to http://localhost:/ .

A tmp/ directory will probably be created automatically by the app. If not, you may need to do so with appropriate permissions. tmp/cache/templates will store compiled templates.

Testing

To run acceptance / end-to-end tests:

vendor/bin/robo test:acceptance

"Unit" tests:

vendor/bin/robo test

TODO

  • not handling error responses from the api atm; if they fail eg bad key, the app will throw an error; I don't have anything that says: "couldn't get result for country X" etc
  • php 5.5 behaving strangely when doing live connections; it might have been my vm; php 7 seems ok
  • getting top artists by country with page=4 limit=5 gives backup more than 5 results; maybe I misinterpreted something
  • I used phpspec for the tests and found it quite awkward; it forces you to work almost exclusively with instantiable objects; no nested describes/contexts; probably should have stuck with phpunit
  • I probably should have looked for a lastfm client on packagist

slim-lastfm's People

Contributors

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