about summary refs log blame commit diff stats
path: root/include/YtdlpWrapper.hpp
blob: 9ee241024b6e039825417f01ecdd57e009aa1c9f (plain) (tree)
1
2
3
4
5
6
7
8
9

                      
                 

                   



                            
 
           
                                                                                   
                                                           
                                                                                             
            

                                           


     
#ifndef YTDLPWRAPPER_H
#define YTDLPWRAPPER_H
#include <string>
#include <vector>
#include <iostream>
#include <pybind11/embed.h>
#include <nlohmann/json.hpp>

class YtdlpWrapper {

    public:
        nlohmann::json getJsonSearch(const std::string& searchTerm, int limit = 1);
        Video::video getVideoByUrl(const std::string& url);
        std::vector<Video::video> searchVideos(const std::string& searchterm, int limit = 1);
    private:
        pybind11::object get_ytdl();       
}; 


#endif