Jump to content
Sign in to follow this  

Help with API

Recommended Posts

I have API code:

POST /feeds/api/videos/VIDEO_ID/complaints HTTP/1.1
Host: gdata.youtube.com
Content-Type: application/atom+xml
Content-Length: CONTENT_LENGTH
Authorization: AuthSub token="AUTHORIZATION_TOKEN"
GData-Version: 2

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom"
  <category scheme="http://gdata.youtube.com/schemas/2007/complaint-reasons.cat"

I want convert it to autoit.

I wrote it but it doesn't work:

$YT_SITE = "gdata.youtube.com"
$YT_PATH = "/feeds/api/videos/VIDEO ID/complaints HTTP/1.1"
$HSESSION = _WINHTTPOPEN("Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv: Gecko/20110420 Firefox/3.6.17")
$GENERAL_BODY = "Authorization: GoogleLogin auth=" & $AUTHKEY & @CRLF & "GData-Version: 2" & @CRLF & "X-GData-Key: key=" & $DEVELOPER_KEY & @CRLF & "Content-Type: application/atom+xml" & @CRLF & @CRLF
$XML_BODY = '<?xml version="1.0" encoding="UTF-8"?>' & @CRLF & '<entry xmlns="http://www.w3.org/2005/Atom"' & @CRLF & 'xmlns:yt="http://gdata.youtube.com/schemas/2007">' & @CRLF & '<sumary>' & @CRLF & 'test' &@CRLF& '</sumary>' & @CRLF & '<category scheme="http://gdata.youtube.com/schemas/2007/complaint-reasons.cat" term="VIOLENCE"/>' & @CRLF & '</entry>' &@CRLF & @CRLF

Anyone can help me ?

Share this post

Link to post
Share on other sites

you already had one question related to the spam for youtube that did not end nicely

and at the moment you post code for adding a comment in response to a video

why did you post this?

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)

There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...