cephalization/Valet

Create 'Account' Service in Angular

Closed this issue · 3 comments

This service will act as a store for account information between various controllers of the application.

Store

  • username

  • playlists

  • account picture link

This ticket is essential for the UI/UX redesign because of how the playlists will be displayed/selected.

After a talk with an attendee of SEMJS, I have decided on an architecture for the service.

The accountService will be the authoritative store of all account information.

  • Handle all HTTP requests for content, cache it

  • Invalidate cached content when the spotify access token dies

  • Return a single account object with all relevant properties

  • Service initializes when the application starts, controllers load latest instance from service when they load

Seems to work, will open new issues for any problems I encounter