YouTube API Wrapper

Default

aboutGet

Get About Information

Retrieves information about the API


/about

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"http://localhost:7077/about"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        try {
            AboutResponse result = apiInstance.aboutGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#aboutGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        try {
            AboutResponse result = apiInstance.aboutGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#aboutGet");
            e.printStackTrace();
        }
    }
}

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get About Information
[apiInstance aboutGetWithCompletionHandler: 
              ^(AboutResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var YouTubeApiWrapper = require('you_tube_api_wrapper');

var api = new YouTubeApiWrapper.DefaultApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.aboutGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class aboutGetExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();

            try
            {
                // Get About Information
                AboutResponse result = apiInstance.aboutGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.aboutGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();

try {
    $result = $api_instance->aboutGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->aboutGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();

eval { 
    my $result = $api_instance->aboutGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->aboutGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()

try: 
    # Get About Information
    api_response = api_instance.about_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->aboutGet: %s\n" % e)

Parameters

Responses

Status: 200 - About Information


captionGet

Get Caption

Retrieves captions for a YouTube video


/caption

Usage and SDK Samples

curl -X GET\
-H "Accept: text/plain,application/json"\
"http://localhost:7077/caption?videoId=&format=&lang="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String videoId = videoId_example; // String | YouTube video ID
        String format = format_example; // String | Caption format (e.g., vtt, srt)
        String lang = lang_example; // String | Language code
        try {
            apiInstance.captionGet(videoId, format, lang);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#captionGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String videoId = videoId_example; // String | YouTube video ID
        String format = format_example; // String | Caption format (e.g., vtt, srt)
        String lang = lang_example; // String | Language code
        try {
            apiInstance.captionGet(videoId, format, lang);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#captionGet");
            e.printStackTrace();
        }
    }
}
String *videoId = videoId_example; // YouTube video ID
String *format = format_example; // Caption format (e.g., vtt, srt) (optional)
String *lang = lang_example; // Language code (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get Caption
[apiInstance captionGetWith:videoId
    format:format
    lang:lang
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var YouTubeApiWrapper = require('you_tube_api_wrapper');

var api = new YouTubeApiWrapper.DefaultApi()
var videoId = videoId_example; // {{String}} YouTube video ID
var opts = { 
  'format': format_example, // {{String}} Caption format (e.g., vtt, srt)
  'lang': lang_example // {{String}} Language code
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.captionGet(videoId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class captionGetExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var videoId = videoId_example;  // String | YouTube video ID
            var format = format_example;  // String | Caption format (e.g., vtt, srt) (optional) 
            var lang = lang_example;  // String | Language code (optional) 

            try
            {
                // Get Caption
                apiInstance.captionGet(videoId, format, lang);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.captionGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$videoId = videoId_example; // String | YouTube video ID
$format = format_example; // String | Caption format (e.g., vtt, srt)
$lang = lang_example; // String | Language code

try {
    $api_instance->captionGet($videoId, $format, $lang);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->captionGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $videoId = videoId_example; # String | YouTube video ID
my $format = format_example; # String | Caption format (e.g., vtt, srt)
my $lang = lang_example; # String | Language code

eval { 
    $api_instance->captionGet(videoId => $videoId, format => $format, lang => $lang);
};
if ($@) {
    warn "Exception when calling DefaultApi->captionGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
videoId = videoId_example # String | YouTube video ID
format = format_example # String | Caption format (e.g., vtt, srt) (optional)
lang = lang_example # String | Language code (optional)

try: 
    # Get Caption
    api_instance.caption_get(videoId, format=format, lang=lang)
except ApiException as e:
    print("Exception when calling DefaultApi->captionGet: %s\n" % e)

Parameters

Query parameters
Name Description
videoId*
String
YouTube video ID
Required
format
String
Caption format (e.g., vtt, srt)
lang
String
Language code

Responses

Status: 200 - Transcript

Status: 400 - Bad request


rootGet

Get Main Information

Retrieves comprehensive information about a YouTube video


/

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"http://localhost:7077/?videoId=&fresh="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String videoId = videoId_example; // String | YouTube or pietsmiet.de video ID
        Boolean fresh = true; // Boolean | Invalidates the cache so a fresh result is returned
        try {
            YoutubeAPIProxyResponse result = apiInstance.rootGet(videoId, fresh);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#rootGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String videoId = videoId_example; // String | YouTube or pietsmiet.de video ID
        Boolean fresh = true; // Boolean | Invalidates the cache so a fresh result is returned
        try {
            YoutubeAPIProxyResponse result = apiInstance.rootGet(videoId, fresh);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#rootGet");
            e.printStackTrace();
        }
    }
}
String *videoId = videoId_example; // YouTube or pietsmiet.de video ID
Boolean *fresh = true; // Invalidates the cache so a fresh result is returned (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get Main Information
[apiInstance rootGetWith:videoId
    fresh:fresh
              completionHandler: ^(YoutubeAPIProxyResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var YouTubeApiWrapper = require('you_tube_api_wrapper');

var api = new YouTubeApiWrapper.DefaultApi()
var videoId = videoId_example; // {{String}} YouTube or pietsmiet.de video ID
var opts = { 
  'fresh': true // {{Boolean}} Invalidates the cache so a fresh result is returned
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.rootGet(videoId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class rootGetExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var videoId = videoId_example;  // String | YouTube or pietsmiet.de video ID
            var fresh = true;  // Boolean | Invalidates the cache so a fresh result is returned (optional) 

            try
            {
                // Get Main Information
                YoutubeAPIProxyResponse result = apiInstance.rootGet(videoId, fresh);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.rootGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$videoId = videoId_example; // String | YouTube or pietsmiet.de video ID
$fresh = true; // Boolean | Invalidates the cache so a fresh result is returned

try {
    $result = $api_instance->rootGet($videoId, $fresh);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->rootGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $videoId = videoId_example; # String | YouTube or pietsmiet.de video ID
my $fresh = true; # Boolean | Invalidates the cache so a fresh result is returned

eval { 
    my $result = $api_instance->rootGet(videoId => $videoId, fresh => $fresh);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->rootGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
videoId = videoId_example # String | YouTube or pietsmiet.de video ID
fresh = true # Boolean | Invalidates the cache so a fresh result is returned (optional)

try: 
    # Get Main Information
    api_response = api_instance.root_get(videoId, fresh=fresh)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->rootGet: %s\n" % e)

Parameters

Query parameters
Name Description
videoId*
String
YouTube or pietsmiet.de video ID
Required
fresh
Boolean
Invalidates the cache so a fresh result is returned

Responses

Status: 200 - Successful response

Status: 400 - Bad request


subtitleGet

Get Subtitle

Retrieves subtitles for a YouTube video


/subtitle

Usage and SDK Samples

curl -X GET\
-H "Accept: text/plain,application/json"\
"http://localhost:7077/subtitle?videoId=&lang="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String videoId = videoId_example; // String | YouTube video ID
        String lang = lang_example; // String | Language code
        try {
            apiInstance.subtitleGet(videoId, lang);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#subtitleGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String videoId = videoId_example; // String | YouTube video ID
        String lang = lang_example; // String | Language code
        try {
            apiInstance.subtitleGet(videoId, lang);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#subtitleGet");
            e.printStackTrace();
        }
    }
}
String *videoId = videoId_example; // YouTube video ID
String *lang = lang_example; // Language code (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get Subtitle
[apiInstance subtitleGetWith:videoId
    lang:lang
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var YouTubeApiWrapper = require('you_tube_api_wrapper');

var api = new YouTubeApiWrapper.DefaultApi()
var videoId = videoId_example; // {{String}} YouTube video ID
var opts = { 
  'lang': lang_example // {{String}} Language code
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.subtitleGet(videoId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class subtitleGetExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var videoId = videoId_example;  // String | YouTube video ID
            var lang = lang_example;  // String | Language code (optional) 

            try
            {
                // Get Subtitle
                apiInstance.subtitleGet(videoId, lang);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.subtitleGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$videoId = videoId_example; // String | YouTube video ID
$lang = lang_example; // String | Language code

try {
    $api_instance->subtitleGet($videoId, $lang);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->subtitleGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $videoId = videoId_example; # String | YouTube video ID
my $lang = lang_example; # String | Language code

eval { 
    $api_instance->subtitleGet(videoId => $videoId, lang => $lang);
};
if ($@) {
    warn "Exception when calling DefaultApi->subtitleGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
videoId = videoId_example # String | YouTube video ID
lang = lang_example # String | Language code (optional)

try: 
    # Get Subtitle
    api_instance.subtitle_get(videoId, lang=lang)
except ApiException as e:
    print("Exception when calling DefaultApi->subtitleGet: %s\n" % e)

Parameters

Query parameters
Name Description
videoId*
String
YouTube video ID
Required
lang
String
Language code

Responses

Status: 200 - Subtitle

Status: 400 - Bad request


transcriptGet

Get Transcript

Retrieves transcript for a YouTube video


/transcript

Usage and SDK Samples

curl -X GET\
-H "Accept: text/plain,application/json"\
"http://localhost:7077/transcript?videoId=&lang="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String videoId = videoId_example; // String | YouTube video ID
        String lang = lang_example; // String | Language code
        try {
            apiInstance.transcriptGet(videoId, lang);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#transcriptGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String videoId = videoId_example; // String | YouTube video ID
        String lang = lang_example; // String | Language code
        try {
            apiInstance.transcriptGet(videoId, lang);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#transcriptGet");
            e.printStackTrace();
        }
    }
}
String *videoId = videoId_example; // YouTube video ID
String *lang = lang_example; // Language code (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get Transcript
[apiInstance transcriptGetWith:videoId
    lang:lang
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var YouTubeApiWrapper = require('you_tube_api_wrapper');

var api = new YouTubeApiWrapper.DefaultApi()
var videoId = videoId_example; // {{String}} YouTube video ID
var opts = { 
  'lang': lang_example // {{String}} Language code
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.transcriptGet(videoId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class transcriptGetExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var videoId = videoId_example;  // String | YouTube video ID
            var lang = lang_example;  // String | Language code (optional) 

            try
            {
                // Get Transcript
                apiInstance.transcriptGet(videoId, lang);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.transcriptGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$videoId = videoId_example; // String | YouTube video ID
$lang = lang_example; // String | Language code

try {
    $api_instance->transcriptGet($videoId, $lang);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->transcriptGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $videoId = videoId_example; # String | YouTube video ID
my $lang = lang_example; # String | Language code

eval { 
    $api_instance->transcriptGet(videoId => $videoId, lang => $lang);
};
if ($@) {
    warn "Exception when calling DefaultApi->transcriptGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
videoId = videoId_example # String | YouTube video ID
lang = lang_example # String | Language code (optional)

try: 
    # Get Transcript
    api_instance.transcript_get(videoId, lang=lang)
except ApiException as e:
    print("Exception when calling DefaultApi->transcriptGet: %s\n" % e)

Parameters

Query parameters
Name Description
videoId*
String
YouTube video ID
Required
lang
String
Language code

Responses

Status: 200 - Transcript

Status: 400 - Bad request