API
The API reference is a detailed documentation of all the endpoints available in the API.
Introduction
Rehooks API is a RESTFul API that allows you to get all the information of the hooks that are in the repository.
Limitations
The API is currently open to everyone and does not require any authentication. However, to prevent abusive use of the API, there is a limit to the number of requests.
Base URL
The base URL for the API is:
Typescript usage
- For Hooks:
Endpoints
GET /hooks
This endpoint returns a list of all the hooks in the repository.
Parameters
limit
: The number of hooks to return. Has no default value.search
: A string to search for in the title of the hooks.
Usage
Response
GET /hooks/:title
This endpoint returns the details of a specific hook.
Parameters
title
: The ID of the hook to get.
Usage
Response
Limit Query Parameter
Query Parameter
limit
: The number of hooks to return. Has no default value.?limit=10
: Returns the first 10 hooks.
You can use the limit
query parameter to limit the number of hooks returned. For example, to get the first 10 hooks, you can use the following URL:
Search Query Parameter
Query Parameter
search
: A string to search for in the title of the hooks.?search=useKeyPress
: Returns all the hooks that contain the word "useKeyPress".
You can use the search
query parameter to search for a specific hook. For example, to search for the hook useKeyPress
, you can use the following URL: