• Get follows

    Parameters

    • configurations: PaginationConfigurations

      pagination configurations

    • followerService: FollowerService

      injected service use to handle the follower related operations

      • findWithPagination
    • followerId: string

      unique identifier of the entity that has been followed

    • followerType: string

      type of the follower

    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

      request context [headers, body, params, query].

    Returns Promise<AdapterHandlerResponse>

    200 Status OK

    • data: list of follows with pagination

    Description

    This handler is used to get follows by applying the following steps in sequence:

    1. Parse paginated list query

    2. Get paginated follows (followerService.findWithPagination)

    3. Return list of follows with pagination

    Throws

    400 NBError Bad Request

    • error when parse paginated list query
    • pagination must be set
    • Page size exceeds ${configurations.maxPageSize} mbs

    Throws

    500 NBError Internal Server Error

    • error getting follow list

    Example: example data response

    {
    "@nextLink": "https://api.example.com/follows?limit=10&offset=10",
    "@previousLink": "https://api.example.com/follows?limit=10&offset=0",
    "count": 10,
    "total": 100,
    "value": [ ...,
    {
    "id": "1",
    "followId": "productId",
    "followType": "product",
    "followerId": "userId",
    "followerType": "user"
    }
    ]
    }

Generated using TypeDoc