moi backend api

resources:

Recursos

Accounts

Recurso Descripción
PUT /api/users/account Update user account

Achievements

Recurso Descripción
GET /api/users/achievements Get user achievements
PUT /api/users/achievements/:id/active Just active or disable an achievement

Analytics

Recurso Descripción
GET /api/analytics/statistics shows user statistics data

Certificates

Recurso Descripción
GET /api/users/certificates returns all certificates saved by user
POST /api/users/certificates saved a new certificate by user
DELETE /api/users/certificates/:id delete a certificate of an user

Content preferences

Recurso Descripción
PUT /api/content_preferences/:kind update kind preference

Contents

Recurso Descripción
POST /api/neurons/:neuron_id/contents/:content_id/read a user reads a content. response includes test if needed
POST /api/neurons/:neuron_id/contents/:content_id/notes To store the notes a user takes of a content. IMPORTANT: If no notes are given then current notes are **deleted** from DB
POST /api/neurons/:neuron_id/contents/:content_id/media_open Save a record when an image is opened.
POST /api/neurons/:neuron_id/contents/:id/tasks To store the tasks a user.
POST /api/api/neurons/:neuron_id/contents/:id/task_update update task's user
GET /api/neurons/:neuron_id/contents/:id shows content
POST /api/neurons/:neuron_id/contents/:id/favorites To store content favorites a user.
POST /api/neurons/:neuron_id/contents/:id/reading_time add reading time from a user to a specific content

Events

Recurso Descripción
GET /api/events Returns all events
GET /api/events/today Get events by day.
GET /api/events/week Get events by week.
GET /api/events/:id Get an event.
POST /api/users/events/:id/take take an event
POST /api/users/events/:id/take_super_event take an super event
GET /api/users/events/my_events get events taken

Final test

Recurso Descripción
POST /api/users/final_test create a test with 21 questions
GET /api/users/final_test/:id Get final test

Leaderboard

Recurso Descripción
GET /api/leaderboard Get leaderboard

Learn

Recurso Descripción
POST /api/learn answer a test and learn contents

Neurons

Recurso Descripción
GET /api/neurons DEPRECATED returns tree neurons. Deprecated in favour of /api/tree
GET /api/neurons/:id shows neuron

Notifications

Recurso Descripción
POST /api/notifications/:id/read_notifications To deleted a notification of a user.
GET /api/notifications get new notifications for current user
GET /api/notifications/details Get total counter tasks
GET /api/notifications/:id/open

Order

Recurso Descripción
PUT /api/order update order coontent preference

Payments

Recurso Descripción
POST /api/payments/tutor_basic_account Create tutor account by payment method
POST /api/payments/add_students Allow to add students at the tutor list by payment method

Players

Recurso Descripción
GET /api/quiz/:quiz_id/player/:player_id get new notifications for current user

Profiles

Recurso Descripción
GET /api/users/profile Get basic information user

Recommended contents

Recurso Descripción
GET /api/neurons/:neuron_id/recommended_contents/:kind recommended contents of a given kind for a neuron

Recommended neurons

Recurso Descripción
GET /api/users/recommended_neurons recommended neurons from user's tree

Registrations
user registration

Recurso Descripción
POST /api/users sign up providing email

Search

Recurso Descripción
GET /api/search returns search from query

Sessions
user session

Recurso Descripción
DELETE /api/auth/user/sign_out log out
POST /api/auth/user/sign_in login
POST /api/auth/user/key_authorize login using `authorization_key`

Sharings

Recurso Descripción
POST /api/sharings create a sharing - for social networks

Storages

Recurso Descripción
PUT /api/users/storages update user data
GET /api/users/storages show user data

Token validations
user session token validation

Recurso Descripción
GET /api/auth/user/validate_token validate user's token

Tree images

Recurso Descripción
PUT /api/users/tree_image create user tree

Trees

Recurso Descripción
GET /api/tree returns tree for current user

Tutor plans

Recurso Descripción
GET /api/tutor_plans returns tutor plans

User images

Recurso Descripción
PUT /api/users/user_image add user image

User tutors

Recurso Descripción
POST /api/user_tutors/:id/respond respond (accept or reject) a **pending** tutor request

Users

Recurso Descripción
GET /api/users/:id/profile user's profile
GET /api/users/search returns search from query
GET /api/users/content_tasks returns all contents saved by user
GET /api/users/content_notes returns all notes saved by user
GET /api/users/content_favorites returns all content-favorites saved by user
POST /api/api/users/shared_contents Send a email with an screenshot(Shared content)
GET /api/users/event_in_progress return last event in progres
GET /api/users/contents_to_learn returns the recommended contents and the event contents