Authenticate plex account in settings gives access to activity graph for your plex user #40

Merged
KevinMidboe merged 24 commits from feature/user-graphs into master 2019-12-27 21:01:50 +00:00
KevinMidboe commented 2019-12-22 20:40:04 +00:00 (Migrated from github.com)

Preface

The backend has been updated to support requests with a plex user authentication key in release v1.1.1 . Along with being able to make requests to plex.tv with your username and password through seasoned which then receives your plex user id. This allows the user to query other services with the common identifier plex userid.
Also meant for more then just charts.

Feature 📊📈 user activity charts

This is highlighted in the frontend by adding user activity-charts accessible by your profile page to see aggregated and graphed data of your own watch history in duration or play count.

Implementation

Add more charts by defining a new chart element:

<div class="chart">
  <canvas ref="activityCanvas"></canvas>
</div>

and then append to the list this.charts:

charts: [{
  name: 'Watch activity',
  ref: 'activityCanvas',
  data: null,
  urlPath: '/plays_by_day',
  graphType: 'line'
}, {
  name: 'Plays by day of week',
  ref: 'playsByDayOfWeekCanvas',
  data: null,
  urlPath: '/plays_by_dayofweek',
  graphType: 'bar'
}]

The object properties are defined as the following: ref is the ref for the canvas defined above, data is where chart data is stored, urlPath is appended to api/v1/user for getting user activity data and graphType can be selected from the following https://www.chartjs.org/docs/latest/charts/.

Screen Shot 2019-12-25 at 21 26 35 Screen Shot 2019-12-25 at 21 24 30 Screen Shot 2019-12-25 at 21 24 51 Screen Shot 2019-12-25 at 21 25 32
# Preface The backend has been updated to support requests with a plex user authentication key in release [v1.1.1](https://github.com/KevinMidboe/seasonedShows/releases/tag/v1.1.1) . Along with being able to make requests to plex.tv with your username and password through seasoned which then receives your plex user id. This allows the user to query other services with the common identifier plex userid. Also meant for more then just charts. # Feature 📊📈 user activity charts This is highlighted in the frontend by adding user activity-charts accessible by your profile page to see aggregated and graphed data of your own watch history in duration or play count. # Implementation Add more charts by defining a new chart element: ```html <div class="chart"> <canvas ref="activityCanvas"></canvas> </div> ``` and then append to the list `this.charts`: ```javascript charts: [{ name: 'Watch activity', ref: 'activityCanvas', data: null, urlPath: '/plays_by_day', graphType: 'line' }, { name: 'Plays by day of week', ref: 'playsByDayOfWeekCanvas', data: null, urlPath: '/plays_by_dayofweek', graphType: 'bar' }] ``` The object properties are defined as the following: `ref` is the ref for the canvas defined above, `data` is where chart data is stored, `urlPath` is appended to `api/v1/user` for getting user activity data and `graphType` can be selected from the following [https://www.chartjs.org/docs/latest/charts/](https://www.chartjs.org/docs/latest/charts/). <img width="1186" alt="Screen Shot 2019-12-25 at 21 26 35" src="https://user-images.githubusercontent.com/2287769/71450200-4289f280-275d-11ea-8cf8-20b051185038.png"> <img width="1816" alt="Screen Shot 2019-12-25 at 21 24 30" src="https://user-images.githubusercontent.com/2287769/71450193-271ee780-275d-11ea-9865-55ad52a5d316.png"> <img width="1752" alt="Screen Shot 2019-12-25 at 21 24 51" src="https://user-images.githubusercontent.com/2287769/71450194-271ee780-275d-11ea-8612-2db9f89ac33f.png"> <img width="386" alt="Screen Shot 2019-12-25 at 21 25 32" src="https://user-images.githubusercontent.com/2287769/71450192-271ee780-275d-11ea-8cd0-4f30196a83d6.png">
Sign in to join this conversation.
No description provided.