diff options
author | ComradeCrow <comradecrow@vivaldi.net> | 2023-05-17 16:05:13 -0700 |
---|---|---|
committer | ComradeCrow <comradecrow@vivaldi.net> | 2023-05-17 16:05:13 -0700 |
commit | 8b4fa2a3b6b1a3d75fd4ae5a61266e159d22e095 (patch) | |
tree | 6bc2c757656071d39b840f6a0db27c53b33eedd5 /include/YtdlpWrapper.hpp | |
parent | 8972e4b0fdc216bf4ea1c0f7e699689d6c84de6a (diff) | |
download | ytcpp-8b4fa2a3b6b1a3d75fd4ae5a61266e159d22e095.tar.gz |
Changes
Start Documenting, add more cpack stuff
Diffstat (limited to 'include/YtdlpWrapper.hpp')
-rw-r--r-- | include/YtdlpWrapper.hpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/YtdlpWrapper.hpp b/include/YtdlpWrapper.hpp new file mode 100644 index 0000000..9ee2410 --- /dev/null +++ b/include/YtdlpWrapper.hpp @@ -0,0 +1,20 @@ +#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 \ No newline at end of file |