Skip to content Skip to sidebar Skip to footer

Undocumented Function - Gapi.client.youtube.commentthreads.insert

When I was browsing Google YouTube DATA API and I found object gapi.client.youtube.commentThreads.insert, I tried to use it but I didn't know how to use it and Data API document

Solution 1:

I found solution, I was stupid because parameters must be passed by object - here is example for someone who would use this function.

var c = new gapi.client.youtube.commentThreads.insert(
    {
        "part": "snippet"
    },
    {
      "snippet": {
        "channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
        "videoId": "NeF0zpT4gNE",
        "topLevelComment": {
          "snippet": {
            "textOriginal": "Hello from API"
          }
        }
      }
    }   
);
c.execute();

Post a Comment for "Undocumented Function - Gapi.client.youtube.commentthreads.insert"