Waziup / api-server

3 stars 6 forks source link

Socials service names #25

Open cdupont opened 6 years ago

cdupont commented 6 years ago

Currently, the socials endpoints look like:

POST /domains/{domain}/socials
{
  "username": "cdupont",
  "channel": "facebook",
  "message": "Test message"
}

It would be easier to secure with explicit endpoint names for each service:

POST /domains/{domain}/socials/sms
{
  "username": "cdupont",
  "message": "Test message"
}
POST /domains/{domain}/socials/facebook
{
  "username": "cdupont",
  "message": "Test message"
}
POST /domains/{domain}/socials/twitter
{
  "username": "cdupont",
  "message": "Test message"
}
cdupont commented 6 years ago

Need to be modified: Swagger: https://github.com/Waziup/api-server/blob/master/swagger/swagger.yaml#L1375

Api-server POST method: add one per social network https://github.com/Waziup/api-server/blob/master/src/proxy.js#L129

Api-server function: add a "postSocialMsg" parameter https://github.com/Waziup/api-server/blob/master/src/lib/social-proxy.js#L26

cdupont commented 6 years ago

@pandaconstantin what is the status?

pandaconstantin commented 6 years ago

Working on :)

2018-02-02 1:41 GMT-08:00 Corentin Dupont notifications@github.com:

@pandaconstantin https://github.com/pandaconstantin what is the status?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Waziup/api-server/issues/25#issuecomment-362536206, or mute the thread https://github.com/notifications/unsubscribe-auth/ABYTJgWideFDEegEpnvO7_oNrltyW5smks5tQtgwgaJpZM4Rnevl .

-- « La Terre est le berceau de l'humanité, mais on ne passe pas sa vie entière dans un berceau. »