Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

yotta / pictogram

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 60
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Restapivalidsubscribetostudent

Restapivalidsubscribetostudent

Last edited by Eladio Blanco López Jun 16, 2015
Page history

<< Student

Suscribirse a los eventos del estudiante (ojo, mediante sockets)

Necesario token.

Operación

POST /stu/subscribe

Petición

Se pasa un objeto JSON con los siguientes campos:

  • action: Acción a realizar --> subscribe
  • attributes: Atributos: id_stu: ID del estudiante
  • token: Token del usuario

Ejemplo de petición:

POST /stu/subscribe

{
        action: 'subscribe',
        attributes:{
          id_stu: 80
        }, 
        token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJvZmZpY2UiOjM4MywiaWQiOjEwLCJuYW1lIjoiQW50b25pbyIsInN1cm5hbWUiOiJMw7NwZXoiLCJnZW5kZXIiOiJNIiwicGljIjoiL3VwbG9hZC9zdXBlcnZpc29ycy8xNDIzNDA3MDMxLmpwZyIsImFkZHJlc3MiOiJBdmRhLiBBbmRhbHVjw61hIDEuIEphw6luIiwiY291bnRyeSI6IkVTIiwiZW1haWwiOiJhbnRvbmlvQGdtYWlsLmNvbSIsInBob25lIjoiKzM0IDk1MyA1NSA3OCA5OCIsImxhbmciOiJlcyIsImFjdGl2ZSI6dHJ1ZSwidHRzRW5naW5lIjpudWxsLCJpYXQiOjE0MzI2MjQ2NTcsImV4cCI6MTQzMjYzMTg1N30.7K2j6XP_K0-cMA5aekIpDHNb365_DzGI4ShIFsZ1fCs"
 }

Respuesta

Se suscribe al usuario y devuelve un mensaje indicando la suscripción realizada.

Ejemplo de respuesta:

{
     msg: "Subscribed to student studentRoom80" 
}
  Clone repository
  • 20170328_isabellemonfort
  • 20170328_luisballesteros
  • 20170328_luisperez
  • Apiaction
  • Apiadminvalid
  • Apiattribute
  • Apidevicevalid
  • Apienrolment
  • Apiinstructionresource
  • Apiinstructionvalid
  • Apilearningunitresource
  • Apimetamethodvalid
  • Apimethod
  • Apimethodresource
  • Apimethodvalid
More Pages
×

New Wiki Page

Tip: You can specify the full path for the new file. We will automatically create any missing directories.