getScript


Description

Gets the latest version of a script, or a specific version of a script

Example request

https://www.rundowncreator.com/channel4news/API.php
     ?APIKey=edharken
     &APIToken=HNe2ADG0nBTiC8Q8WiVfsxeG5ip51A
     &Action=getScript
     &RowID=3

Example response

[
    {
        "ScriptID": 6,
        "Author": {
            "UserID": 1,
            "FirstName": "Ed",
            "LastName": "Harken"
        },
        "RundownID": 1,
        "RowID": 3,
        "Version": 4,
        "Script": "{RON}\n<cg id=\"1\" template=\"talent\" line1=\"Ron Burgundy\">\n\tTHIS MORNING, A LA JOLLA MAN IS CLINGING TO LIFE AFTER BEING VICIOUSLY ATTACKED BY A PACK OF WILD DOGS.\n{VO}\n<cg id=\"2\" template=\"1line\" line1=\"La Jolla\">\n\tIT HAPPENED WHILE THE MAN WAS OUT ON THE TOWN LAST NIGHT IN LA JOLLA.\n\tSOME FELLOW SAN DIEGANS FOUND HIM AFTERWARDS -- BITTEN AND BLEEDING, PASSED OUT IN AN ALLEYWAY BEHIND A BAR.\n\tTHE POLICE CHIEF SAYS HE WAS IN PRETTY *RUFF* CONDITION.\n{SOT}\n<cg id=\"3\" template=\"2line\" line1=\"William Lansdowne\" line2=\"San Diego Police Chief\">\n(\"Paramedics arrived and the victim, who suffered several major lacerations from the attack, was taken to UCSD Medical Center.\")\n[Outcue: 8 \"...UCSD Medical Center\"]\n\n{MORE VO}\n\tCOMING UP TONIGHT ON THE CHANNEL 4 NEWS, WE'LL TELL YOU HOW TO DEFEND YOURSELF AGAINST A PACK OF WILD DOGS, SHOULD YOU EVER BE ATTACKED.",
        "ReadRate": 20,
        "ActualDuration": 33
    }
]

Required parameters

RowID integer if set, the latest version of the script in the RowID specified will be returned
-or-
ScriptID integer if set, the script with the ScriptID specified will be returned

Optional parameters

GetScript boolean if set to true, the response returned will include the script in the Script field. If set to false, it will not. Defaults to true
RemoveCurlyBrackets boolean if set to true, text in curly brackets will be removed from the script in the Script field. If set to false, it will not. Defaults to false
RemoveSquareBrackets boolean if set to true, text in square brackets will be removed from the script in the Script field. If set to false, it will not. Defaults to false
RemoveParentheses boolean if set to true, text in parentheses will be removed from the script in the Script field. If set to false, it will not. Defaults to false
RemoveCarets boolean if set to true, text in carets will be removed from the script in the Script field. If set to false, it will not. Defaults to false
GetPriorVersions boolean if set to true, all versions of the script in the RowID specified will be returned. If set to false, only the latest version of the script in the RowID specified will be returned. Defaults to false
GetTimestamps boolean if set to true, the date/time that the script was created will be included in the response returned in the DateCreated field. If set to false, it will not. Defaults to false

Returns

ScriptID integer the unique ID of the version of the script
DateCreated integer the date/time that the version of the script was saved. Only returned if GetTimestamps is set to true
Author.UserID integer the unique ID of the user who saved the version of the script
Author.FirstName string the first name of the user who saved the version of the script
Author.LastName string the last name of the user who saved the version of the script
RundownID integer the unique ID of the rundown the script is saved in
RowID integer the unique ID of the row the script is saved in
Version integer the script's sequential version number. For example: 1 if it's the first version of the script, or 5 if it's the 5th version
Script string the script. Only returned if GetScript is true (it is by default)
ReadRate integer the talent's read rate (an approximation of how many characters they read per second)
ActualDuration integer how long, in seconds, the script times out to be, based on the number of characters in it (excluding text in curly brackets, square brackets, parentheses, and carets), the ReadRate, and any durations like [30] or [1:45] in the script