{"repo":"makenotion/notion-sdk-js","free":true,"listed":false,"github":"https://github.com/makenotion/notion-sdk-js","clone":"git clone https://github.com/makenotion/notion-sdk-js.git","description":"Official Notion JavaScript Client","language":"TypeScript","stars":5649,"topics":["typescript","javascript","notion","js","api-client","api"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Notion SDK for JavaScript A simple and easy to use client for the Notion API. Installation Usage [!NOTE] Use Notion's Getting Started Guide to get set up to use Notion's API. Import and initialize a client using an integration token or an OAuth access token . Make a request to any Notion API endpoint. [!NOTE] See the complete list of endpoints in the API reference. Each method returns a Promise that resolves the response. Endpoint parameters are grouped into a single object. You don't need to remember which parameters go in the path, query, or body. Handling errors If the API returns an unsuccessful response, the returned Promise rejects with a APIResponseError . The error contains properties from the response, and the most helpful is code . You can compare code to the values in the APIErrorCode object to avoid misspelling error codes. Logging The client emits useful information to a logger. By default, it only emits warnings and errors. If you're debugging an application, and would like the client to log response bodies, set the logLevel option to LogLevel.DEBUG . You may also set a custom logger to emit logs to a destination other than stdout . A custom logger is a function which is called with 3 parameters: logLevel , message , and extraInfo . The custom logger should not return a value. Client options The Client supports the following options on initialization. These options are all keys in the single constructor parameter. Option Default value Type Description ----------","default_branch":null,"files":null,"tree":[],"storefront":"/r/makenotion","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/makenotion/notion-sdk-js/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}