pornsieve  0.0.0
Search porn sites and filter the results using regular expressions
redtube.hpp
Go to the documentation of this file.
1 /* This file is part of pornsieve.
2  * Copyright © 2021 tastytea <tastytea@tastytea.de>
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Affero General Public License as published by
6  * the Free Software Foundation, version 3.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Affero General Public License for more details.
12  *
13  * You should have received a copy of the GNU Affero General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
23 #ifndef PORNSIEVE_REDTUBE_HPP
24 #define PORNSIEVE_REDTUBE_HPP
25 
26 #include "search.hpp"
27 
28 #include <cstdint>
29 #include <string>
30 #include <string_view>
31 #include <vector>
32 
39 {
40 
41 using std::string;
42 using std::string_view;
43 using std::vector;
44 
62 vector<string> get_categories();
63 
77 vector<string> get_tags();
78 
106 search_result search(media_type type, string_view query,
107  const vector<string_view> &tags = {},
108  string_view category = {},
109  result_order order_by = result_order::none,
110  std::uint32_t page = 1);
111 
112 } // namespace pornsieve::redtube
113 
114 #endif // PORNSIEVE_REDTUBE_HPP
pornsieve::redtube
Namespace for the RedTube API.
Definition: redtube.hpp:38
pornsieve::redtube::get_tags
vector< string > get_tags()
Get a list of tags from RedTube.
Definition: redtube.cpp:80
pornsieve::result_order
result_order
Order of the search results.
Definition: search.hpp:46
search.hpp
Types for search functions.
pornsieve::redtube::search
search_result search(media_type type, string_view query, const vector< string_view > &tags={}, string_view category={}, result_order order_by=result_order::none, std::uint32_t page=1)
Search RedTube.
Definition: redtube.cpp:109
pornsieve::redtube::get_categories
vector< string > get_categories()
Get a list of categories from RedTube.
Definition: redtube.cpp:49
pornsieve::media_type
media_type
Which type of media to search for.
Definition: search.hpp:64
pornsieve::search_result
Search results.
Definition: search.hpp:74