'Get graph data by source resolution.
Required parameters:
None
Optional parameters:
time_range (str):       The number of days of data to return
y_axis (str):           "plays" or "duration"
user_id (str):          The user id to filter the data
Returns:
json:
{"categories":
["720", "1080", "sd", ...]
"series":
[{"name": "Direct Play", "data": [...]}
{"name": "Direct Stream", "data": [...]},
{"name": "Transcode", "data": [...]}'

@cherrypy.expose
@cherrypy.tools.json_out()
@requireAuth()
@addtoapi()
def get_plays_by_source_resolution(self, time_range='30', y_axis='plays', user_id=None, **kwargs):

    graph = graphs.Graphs()
    result = graph.get_total_plays_by_source_resolution(time_range=time_range, y_axis=y_axis, user_id=user_id)
    if result:
        return result
    else:
        logger.warn(u'Unable    to    retrieve    data    for    get_plays_by_source_resolution.')
