Skip to content
This repository has been archived by the owner on Sep 27, 2018. It is now read-only.

Post Subscription

Budi Syahiddin edited this page Dec 24, 2017 · 1 revision

Getting subscribed post

URL: localhost:8080/api/v1/postSub

Method: GET

Headers:

  • Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBdXRoZW50aWNhdGlvbiIsImlzcyI6Ik1zb2NpZXR5IiwiaWQiOiJEQTQ0OEJGMUQ2QzJDNThEMUNGMDhFREIzOUI0RkEyOEI3MURERDhFQzRENUY2NTkyODdBOERCMUZGOTU1OTREIiwiZW1haWwiOiJnaG9zdG9wczFAaG90bWFpbC5zZyJ9.3YA0oduJc18SDY9SKmUn-GsRcXnKM9rWfGk8n8u9amc Note: After Bearer there has to be a space before the token

Success Response:

[
    "4a6a5d0a5ae92ee1ac620a664f3834820cc8043e348e5af2cdf4ac3aec265138",
    "3e35f19a9ff0380e29a3c02011980b466e428129f085600fa6956b2f969278e3"
]

Error Response: Nothing

  • Code : 200

Subscribing to Post

URL: localhost:8080/api/v1/postSub

Method: POST

Headers:

  • Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBdXRoZW50aWNhdGlvbiIsImlzcyI6Ik1zb2NpZXR5IiwiaWQiOiJEQTQ0OEJGMUQ2QzJDNThEMUNGMDhFREIzOUI0RkEyOEI3MURERDhFQzRENUY2NTkyODdBOERCMUZGOTU1OTREIiwiZW1haWwiOiJnaG9zdG9wczFAaG90bWFpbC5zZyJ9.3YA0oduJc18SDY9SKmUn-GsRcXnKM9rWfGk8n8u9amc Note: After Bearer there has to be a space before the token

Required data Params:

  • postId=[String]

Success Response: Successfully subbed to $postId

Error Response:

  • Code : 400 Bad Request
{
    "msg": "Bad Request",
    "errorId": 4186
}

Unsubscribing to Post

URL: localhost:8080/api/v1/postSub

Method: DELETE

Headers:

  • Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBdXRoZW50aWNhdGlvbiIsImlzcyI6Ik1zb2NpZXR5IiwiaWQiOiJEQTQ0OEJGMUQ2QzJDNThEMUNGMDhFREIzOUI0RkEyOEI3MURERDhFQzRENUY2NTkyODdBOERCMUZGOTU1OTREIiwiZW1haWwiOiJnaG9zdG9wczFAaG90bWFpbC5zZyJ9.3YA0oduJc18SDY9SKmUn-GsRcXnKM9rWfGk8n8u9amc Note: After Bearer there has to be a space before the token

Required data Params:

  • postId=[String]

Success Response: Successfully unsubbed from $postId

Error Response:

  • Code : 400 Bad Request
{
    "msg": "Bad Request, Invalid postId",
    "errorId": 4186
}
Clone this wiki locally