Tag

Router

class TagRouter()

Tag router for directing between tag list and new

Cards List

class TagList(props)

Tag card list component

TagList.getTags()

Get tags info from API

TagList.handleDeleteTag(tag_id, event)

Make delete tag request of API

Arguments
  • tag_id (*) – Tag ID

  • event (*) – Event Data

TagGrid(props)

Tag card grid component

Arguments
  • props (*) – Properties

Returns

Grid component

TagCard(props)

Tag card component

Arguments
  • props (*) – Properties

Returns

Card component

Map tag name to URL

Arguments
  • tagName (*) – Subject tag name

Returns

Tag URL

New Tag Card

class NewTag(props)

New tag card component

NewTag.handleInputChange(event)

Handle tag id input box state changes

Arguments
  • event (*) –

NewTag.handleSubmit(event)

Validate input, make new tag API request

Arguments
  • event (*) –

View/Edit Tag

class TagView(props)

Tag View card

TagView.componentDidMount()

Get tag info from API on load

TagView.getTag(error_toast=true)

Get tag info from API

Arguments
  • error_toast (*) – Whether to show toast on network error

TagView.getUserInfo()

Get user info from API

TagView.handleAdd()

Validate input, make tag part add request of API

Returns

Nothing

TagView.handleChangeAddType(type)

Handle adding type drop down change

Arguments
  • type (*) –

TagView.handleCheckChange(event)

Handle checkbox state changes, make network updates

Arguments
  • event (*) – Event data

TagView.handleInputChange(event)

Handle input box state changes

Arguments
  • event (*) – Event data

TagView.handleRemoveObj(music_obj, addType, event)

Handle remove watched part

Arguments
  • music_obj (*) – Subject object to remove

  • addType (*) – Object type (tracks/albums/artists)

  • event (*) – Event data

TagView.handleRun(event)

Validate input and make tag refresh update of API

Arguments
  • event (*) –

TagView.handleView(music_obj, addType, event)

Open a tag element in Last.fm

Arguments
  • music_obj (*) – Tag element to be viewed

  • addType (*) – Tag type, artist, album etc

  • event (*) –

TagView.makeNetworkUpdate(changes)

Put tag info changes to API

Arguments
  • changes (*) – Dictionary of changes to submit