Discogs.Tasks (discogs_shuffle v0.2.1) View Source

Namespace for common application tasks.

Link to this section Summary

Functions

Shuffles records a user's collection, returning n = num_records.

Fetches a user's collection from Discogs, persists all associated models to the local db and updates the user's collection if had been stored previously.

Link to this section Types

Link to this section Functions

Link to this function

shuffle_collection(username, num_records)

View Source

Specs

shuffle_collection(username :: String.t(), num_records :: pos_integer()) :: [
  %Discogs.Models.Record{
    __meta__: term(),
    artists: term(),
    disc_number: term(),
    id: term(),
    inserted_at: term(),
    release: term(),
    release_id: term(),
    updated_at: term()
  }
]

Shuffles records a user's collection, returning n = num_records.

Link to this function

sync_collection(username)

View Source

Specs

sync_collection(username :: String.t()) :: result()

Fetches a user's collection from Discogs, persists all associated models to the local db and updates the user's collection if had been stored previously.