Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation Clarification Request #210

Open
DawidKuta opened this issue Jul 7, 2024 · 0 comments
Open

Documentation Clarification Request #210

DawidKuta opened this issue Jul 7, 2024 · 0 comments

Comments

@DawidKuta
Copy link

Description
I noticed a potential issue in the documentation regarding the parameter notation in the code comments. For example, the notation [options[].processInitialData=true] seems unusual, and I'm not sure if it's correct. Typically, options parameters are documented without the array notation when describing properties of an object.

Code Snippet

/**
* Create a new WebcastPushConnection instance
* @param {string} uniqueId TikTok username (from URL)
* @param {object} [options] Connection options
* @param {boolean} [options[].processInitialData=true] Process the initital data which includes messages of the last minutes
* @param {boolean} [options[].fetchRoomInfoOnConnect=true] Fetch the room info (room status, streamer info, etc.) on connect (will be returned when calling connect())
* @param {boolean} [options[].enableExtendedGiftInfo=false] Enable this option to get extended information on 'gift' events like gift name and cost
* @param {boolean} [options[].enableWebsocketUpgrade=true] Use WebSocket instead of request polling if TikTok offers it
* @param {boolean} [options[].enableRequestPolling=true] Use request polling if no WebSocket upgrade is offered. If `false` an exception will be thrown if TikTok does not offer a WebSocket upgrade.
* @param {number} [options[].requestPollingIntervalMs=1000] Request polling interval if WebSocket is not used
* @param {string} [options[].sessionId=null] The session ID from the "sessionid" cookie is required if you want to send automated messages in the chat.
* @param {object} [options[].clientParams={}] Custom client params for Webcast API
* @param {object} [options[].requestHeaders={}] Custom request headers for axios
* @param {object} [options[].websocketHeaders={}] Custom request headers for websocket.client
* @param {object} [options[].requestOptions={}] Custom request options for axios. Here you can specify an `httpsAgent` to use a proxy and a `timeout` value for example.
* @param {object} [options[].websocketOptions={}] Custom request options for websocket.client. Here you can specify an `agent` to use a proxy and a `timeout` value for example.
*/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant