Documentation
¶
Index ¶
- Constants
- func BuildBatchURL(rpcID, sourcePath, sessionID string) string
- func BuildChatURL(sessionID string, reqID int) string
- func DecodeBatchResponse(body string, targetRPCID string) (json.RawMessage, error)
- func EncodeBatchRequest(rpcID string, params any, csrfToken string) (string, error)
- func IsAuthError(err error) bool
- func IsNotFound(err error) bool
- func IsRateLimit(err error) bool
- func ParseResultArray(raw json.RawMessage) ([]any, error)
- func SafeArray(data []any, indices ...int) []any
- func SafeFloat(data []any, indices ...int) float64
- func SafeString(data []any, indices ...int) string
- type ArtifactStatusCode
- type ArtifactTypeCode
- type CallResult
- type Caller
- type Error
- type ErrorCode
- type SourceStatusCode
Constants ¶
const ( // Notebook operations MethodListNotebooks = "wXbhsf" MethodCreateNotebook = "CCqFvf" MethodGetNotebook = "rLM1Ne" MethodRenameNotebook = "s0tc2d" MethodDeleteNotebook = "WWINqb" // Source operations MethodAddSource = "izAoDd" MethodAddSourceFile = "o4cbdc" // Register uploaded file as source MethodDeleteSource = "tGMBJ" MethodGetSource = "hizoJc" MethodRefreshSource = "FLmJqe" MethodCheckSourceFreshness = "yR9Yof" MethodUpdateSource = "b7Wfje" MethodDiscoverSources = "qXyaNe" // Summary and query MethodSummarize = "VfAZjd" MethodGetSourceGuide = "tr032e" MethodGetSuggestedReports = "ciyUvf" // Artifact operations MethodCreateArtifact = "R7cb6c" MethodListArtifacts = "gArtLc" MethodDeleteArtifact = "V5N4be" MethodRenameArtifact = "rc3d8d" MethodExportArtifact = "Krh3pd" MethodGetInteractiveHTML = "v9rmvd" MethodReviseSlide = "KmcKPe" // Research MethodStartFastResearch = "Ljjv0c" MethodStartDeepResearch = "QA9ei" MethodPollResearch = "e3bVqc" MethodImportResearch = "LBwxtb" // Note and mind map operations MethodGenerateMindMap = "yyryJe" MethodCreateNote = "CYK0Xb" MethodGetNotesAndMindMaps = "cFji9" MethodUpdateNote = "cYAfTb" MethodDeleteNote = "AH0mwd" // Conversation MethodGetLastConversationID = "hPTbtc" MethodGetConversationTurns = "khqZz" // Sharing operations // Additional operations MethodRemoveRecentlyViewed = "fejl7e" MethodGetUserSettings = "ZwVcOc" MethodSetUserSettings = "hT54vc" )
const ( BatchExecuteURL = "https://notebooklm.google.com/_/LabsTailwindUi/data/batchexecute" QueryURL = "" /* 156-byte string literal not displayed */ UploadURL = "https://notebooklm.google.com/upload/_/" )
API endpoint URLs
Variables ¶
This section is empty.
Functions ¶
func BuildBatchURL ¶
BuildBatchURL constructs the full URL for a batchexecute call.
func BuildChatURL ¶
BuildChatURL constructs the URL for chat/query endpoint.
func DecodeBatchResponse ¶
func DecodeBatchResponse(body string, targetRPCID string) (json.RawMessage, error)
DecodeBatchResponse parses the batchexecute response format. Format:
)]}' <- anti-XSSI prefix (remove) <byte_count> <json_payload> ... (repeated chunks)
Each payload is a JSON array. We look for wrb.fr entries matching the target RPC ID. null result_data is valid (empty list, void operation success).
func EncodeBatchRequest ¶
EncodeBatchRequest builds the form-encoded body for a batchexecute call. Format: f.req=[[[rpc_id, json_params, null, "generic"]]]&at=csrf_token&
func IsAuthError ¶
func IsNotFound ¶
func IsRateLimit ¶
func ParseResultArray ¶
func ParseResultArray(raw json.RawMessage) ([]any, error)
ParseResultArray parses the result JSON into a generic nested array.
func SafeString ¶
SafeString extracts a string from a nested array at the given indices.
Types ¶
type ArtifactStatusCode ¶
type ArtifactStatusCode int
ArtifactStatusCode represents artifact processing status.
const ( ArtifactStatusProcessing ArtifactStatusCode = 1 ArtifactStatusPending ArtifactStatusCode = 2 ArtifactStatusCompleted ArtifactStatusCode = 3 ArtifactStatusFailed ArtifactStatusCode = 4 )
func (ArtifactStatusCode) String ¶
func (s ArtifactStatusCode) String() string
type ArtifactTypeCode ¶
type ArtifactTypeCode int
ArtifactTypeCode represents artifact type codes used in RPC calls.
const ( ArtifactCodeAudio ArtifactTypeCode = 1 ArtifactCodeReport ArtifactTypeCode = 2 ArtifactCodeVideo ArtifactTypeCode = 3 ArtifactCodeQuiz ArtifactTypeCode = 4 ArtifactCodeMindMap ArtifactTypeCode = 5 ArtifactCodeInfographic ArtifactTypeCode = 7 ArtifactCodeSlideDeck ArtifactTypeCode = 8 ArtifactCodeDataTable ArtifactTypeCode = 9 )
type CallResult ¶
type CallResult struct {
Raw json.RawMessage
Parsed []any
}
CallResult holds the parsed result of an RPC call.
type Caller ¶
type Caller struct {
HTTPClient *http.Client
Cookies []*http.Cookie
CSRFToken string
SessionID string
// contains filtered or unexported fields
}
Caller handles RPC calls to the NotebookLM batchexecute API.
type SourceStatusCode ¶
type SourceStatusCode int
SourceStatusCode represents source processing status.
const ( SourceStatusProcessing SourceStatusCode = 1 SourceStatusReady SourceStatusCode = 2 SourceStatusError SourceStatusCode = 3 SourceStatusPreparing SourceStatusCode = 5 )
func (SourceStatusCode) String ¶
func (s SourceStatusCode) String() string