rest api
TRANSCRIPT
![Page 1: REST API](https://reader035.vdocuments.net/reader035/viewer/2022073011/558c734bd8b42a5c098b4749/html5/thumbnails/1.jpg)
Method Parmenter Resource (from root) Return value Description
GET date/ String Generates un unique String for the challenge login exchange.
GET users/ List<User> List all users
PUT user users/ String Add a user (register). The return value is the token. User parameter is the representation of the user that want to be added.
POST TU_challenge email, hash(password)
users/login HTTP 200 OK Login a user TU_challenge is a HTTP header for the challenge login exchange.
GET categories List<Category> List all the categories
GET categories/{$d Category Info. of one Category ($id)
GET categories/{id }/charts List<BaseChart> List all charts that exist in the same category
GET sort: {date, popular, name} concrete
charts?sort=$sort&concrete=$1,2,3 List<BaseChart> List all the charts. With the parameter concrete, the client indicates which chart_ids wants.
GET sort: {date, popular, name}
charts/new List<BaseChart> List all the new charts. New charts are considered the ones uploaded in the last 5 days.
GET charts/null Double Null value defined for Y points without value.
GET x, y, year, month, week, day, type
charts/$id?x=$x&y=$y &year=$year&month=$month &week=$week&day=$day&type=$type
Chart Info. of one chart ($id). x width resolution of the mobile. y height resolution of the mobile. type algorithm selected (average or dispersion)
GET charts/$id/series List<Serie> List all the lines related with this chart
GET charts/$id/comment List<Comment> List all the comments related with a chart
GET charts/$id/comment/$id Comment Info. about the comment (id_comment)
PUT comment charts/$id/comment Comment Add a comment to the chart ($id). comment parameter is the representation of the comment that want to be added.
DELETE charts/$id/comment/$id HTTP 200 OK Delete the comment $comment_id from the chart $chart_id