Intermediate SQL with Ecto - LoneStar ElixirConf 2018
REST API
1. 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 users/login HTTP 200 OK Login a user
email, TU_challenge is a HTTP header for the challenge login
hash(password) 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, charts?sort=$sort&concrete=$1,2,3 List<BaseChart> List all the charts.
popular, With the parameter concrete, the client indicates which
name} chart_ids wants.
concrete
GET sort: {date, charts/new List<BaseChart> List all the new charts.
popular, New charts are considered the ones uploaded in the last 5
name} days.
GET charts/null Double Null value defined for Y points without value.
GET x, y, year, charts/$id?x=$x&y=$y Chart Info. of one chart ($id).
month, week, &year=$year&month=$month x width resolution of the mobile.
day, type &week=$week&day=$day&type=$type 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