Code Monkey home page Code Monkey logo

refind's People

Watchers

 avatar  avatar  avatar

refind's Issues

Rename types and functions

Lister, FromTracks, and other types/functions have names that are not up to par with a good Go package. They should be renamed to better describe their behavior.

Add test coverage

Using the package in another library revealed a memory error. A suite of table tests should be added for each function.

Change interfaces to match correct Spotify opt functions

The Spotify package used to implement the Spotify Service subpackage has default and optional functions for most client functions. The default functions were used to implement a minimum functional package but must now be changed for the optional functions that allow for better data fetching.

Allow playlist description customization

Every playlist simple has a description of "description".

Instead, the Playlist function should take an additional string parameter to use as the playlist description.

Rename SpotifyService to Spotify

SpotifyService is a subpackage that implements the MusicService interface. Renaming the subpackage to Spotify simplifies its import and public API.

Add documentation

Every exported function, type, and variable needs to be documented.

Add README

Repository needs a README to describe the installation, usage, and goals of the project.

Implement complete track and artist fetching

Currently, the Spotify service subpackage is only fetching the default amount of tracks and artists from the default time frame. This should be extended to fetch all 50 allowed tracks and artists from all 3 time frames.

Remove unnecessary exports

Several types, functions, and constants are being exported as part of the public API when they should not be. This is increasing the surface area of the API and allowing users to depend on parts of the package that can change. They should be unexported.

Remove Playlist type

The Playlist type might be out of scope for this package. It may be better to simply return a list of tracks to users of this package and let them handle the actual playlist creation on their own terms. This will give the package a narrowed scope.

Add generator constructor

Type generator needs a constructor that takes an argument implementing MusicService. This argument will then be wrapped inside a buffer and set as the generator's service.

Refactor Tracklist into two functions

Currently, the Tracklist function returns a list of tracks primarily using the fromTracks function with fromArtists as a fallback. It would be more straightforward to export two separate functions that use fromTracks and fromArtists separately.

Change Tracklist functions to take a size parameter

As is stands, the Recommendations function retrieves as many recommendations as it can get using the provided Seeds. Instead, it should accept an integer argument to act as a limit to the number of tracks to return.

Add error checking to Seed functions

Artist and Track types have method Seed. Currently, Seed returns a type Seed even if the necessary data to create that type is not available. The Seed method should return an error if it does not have the necessary data.

Export Playlist function

The spotify service should export its playlist function to simplify playlist creation from a tracklist. This also means it will need to be tested.

Refactor buffer into its own package

Type buffer and its methods are not being tested directly through the refind package's public methods. This means it might be prudent to refactor them into their own package to be tested on their own.

Implement familiar artist culling

When a playlist is being generated, artists familiar to the user should be culled from the list. This will introduce the user to more artists they have not encountered yet. In order to do this, a list of top artists and top tracks should be fetched. Concatenate the list of top artists and the top track's artists. Finally, invalidate any generated tracks with an artist from that list.

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.