Skip to content

Commit

Permalink
aria2c download updated for the username and apikey
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetmertguduz committed Jun 3, 2024
1 parent 8f4eb79 commit 982d961
Show file tree
Hide file tree
Showing 15 changed files with 59 additions and 60 deletions.
4 changes: 2 additions & 2 deletions docs/html/d1/d14/fetch_8c_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> }</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> </div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="comment">/* Download the JSON response. */</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <a class="code hl_function" href="../../d6/d60/aria2__download_8c.html#a5d6732ce337f794d14f9f2b835a0d2ef">aria2_download</a>(tags, page, is_nsfw, 20);</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <a class="code hl_function" href="../../d6/d60/aria2__download_8c.html#a89f12219462c5d1dd6d1d1dc2896914d">aria2_download</a>(tags, page, is_nsfw, 20);</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> </div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="comment">/* Check if the JSON response downloaded. */</span></div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> FILE *response_json = fopen(<span class="stringliteral">&quot;posts.json&quot;</span>, <span class="stringliteral">&quot;r&quot;</span>);</div>
Expand Down Expand Up @@ -287,7 +287,7 @@
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> <span class="comment">/* Delete posts.json file. */</span></div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> remove(<span class="stringliteral">&quot;posts.json&quot;</span>);</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span>}</div>
<div class="ttc" id="aaria2__download_8c_html_a5d6732ce337f794d14f9f2b835a0d2ef"><div class="ttname"><a href="../../d6/d60/aria2__download_8c.html#a5d6732ce337f794d14f9f2b835a0d2ef">aria2_download</a></div><div class="ttdeci">void aria2_download(char *tags, int page, bool is_nsfw, int lim)</div><div class="ttdoc">downloads the API response by using aria2c, works with a system call</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/d60/aria2__download_8c_source.html#l00019">aria2_download.c:19</a></div></div>
<div class="ttc" id="aaria2__download_8c_html_a89f12219462c5d1dd6d1d1dc2896914d"><div class="ttname"><a href="../../d6/d60/aria2__download_8c.html#a89f12219462c5d1dd6d1d1dc2896914d">aria2_download</a></div><div class="ttdeci">void aria2_download(char *tags, bool is_nsfw, char *uname, char *apikey, int page, int lim)</div><div class="ttdoc">downloads the API response by using aria2c, works with a system call</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/d60/aria2__download_8c_source.html#l00019">aria2_download.c:19</a></div></div>
<div class="ttc" id="acjson_8h_html_aff2566f4c366b48d73479bef43ee4d2e"><div class="ttname"><a href="../../d5/d56/cjson_8h.html#aff2566f4c366b48d73479bef43ee4d2e">buffer</a></div><div class="ttdeci">char * buffer</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d56/cjson_8h_source.html#l00170">cjson.h:170</a></div></div>
<div class="ttc" id="acjson__error__msg_8c_html_aee955f677a4d5906d3a7f972ccb8543e"><div class="ttname"><a href="../../df/d16/cjson__error__msg_8c.html#aee955f677a4d5906d3a7f972ccb8543e">cjson_error_msg</a></div><div class="ttdeci">void cjson_error_msg(const char *ptr_error)</div><div class="ttdoc">Shows some information when cjson root gives error.</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d16/cjson__error__msg_8c_source.html#l00018">cjson_error_msg.c:18</a></div></div>
<div class="ttc" id="afetch_8c_html_a263efd24d550124313df51247f07457a"><div class="ttname"><a href="../../d1/d14/fetch_8c.html#a263efd24d550124313df51247f07457a">MAX_FILE_PATH</a></div><div class="ttdeci">#define MAX_FILE_PATH</div><div class="ttdoc">This macro is used to set the default size for getting the home directory file.</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d14/fetch_8c_source.html#l00015">fetch.c:15</a></div></div>
Expand Down
13 changes: 0 additions & 13 deletions docs/html/d5/d05/yiffy__fetch_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@
<tr class="memdesc:a41f382b6bd05c9776641fb4bc5024afa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the configuration file, sets the options and sends a request to e621-e926. After taking the response, it calls the output function to show the URLs. <a href="../../d5/d05/yiffy__fetch_8h.html#a41f382b6bd05c9776641fb4bc5024afa">More...</a><br /></td></tr>
<tr class="separator:a41f382b6bd05c9776641fb4bc5024afa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d6732ce337f794d14f9f2b835a0d2ef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d05/yiffy__fetch_8h.html#a5d6732ce337f794d14f9f2b835a0d2ef">aria2_download</a> (char *tags, int page, bool is_nsfw, int lim)</td></tr>
<tr class="memdesc:a5d6732ce337f794d14f9f2b835a0d2ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">downloads the API response by using aria2c, works with a system call <a href="../../d5/d05/yiffy__fetch_8h.html#a5d6732ce337f794d14f9f2b835a0d2ef">More...</a><br /></td></tr>
<tr class="separator:a5d6732ce337f794d14f9f2b835a0d2ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
Expand Down Expand Up @@ -234,18 +233,6 @@ <h2 class="memtitle"><span class="permalink"><a href="#a5d6732ce337f794d14f9f2b8
</table>
</div><div class="memdoc">

<p>downloads the API response by using aria2c, works with a system call </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">tags</td><td>These are the e621-e926 tags prompted by the user as an argument value. Example: yiffy &ndash;fetch "anthro+fur+male+smile". </td></tr>
<tr><td class="paramname">page</td><td>This is the value that is passed to the API to get results from the specified pages. </td></tr>
<tr><td class="paramname">is_nsfw</td><td>This is the boolean value that checks the NSFW option. If true, sets the request string for e621 otherwise sets for e926. </td></tr>
</table>
</dd>
</dl>

<p class="definition">Definition at line <a class="el" href="../../d6/d60/aria2__download_8c_source.html#l00019">19</a> of file <a class="el" href="../../d6/d60/aria2__download_8c_source.html">aria2_download.c</a>.</p>

</div>
</div>
<a id="a41f382b6bd05c9776641fb4bc5024afa" name="a41f382b6bd05c9776641fb4bc5024afa"></a>
Expand Down
4 changes: 2 additions & 2 deletions docs/html/d5/d05/yiffy__fetch_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="../../d5/d05/yiffy__fetch_8h.html#acbd50aa1f19ce68034a26b45b0aaed69"> 25</a></span><span class="preprocessor">#define BAD_SYSTEM_FUNC_CALL -1</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d5/d05/yiffy__fetch_8h.html#a41f382b6bd05c9776641fb4bc5024afa">fetch</a>(<span class="keywordtype">char</span> *tags, <span class="keywordtype">int</span> page, <span class="keywordtype">char</span> *command);</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d5/d05/yiffy__fetch_8h.html#a5d6732ce337f794d14f9f2b835a0d2ef">aria2_download</a>(<span class="keywordtype">char</span> *tags, <span class="keywordtype">int</span> page, <span class="keywordtype">bool</span> is_nsfw, <span class="keywordtype">int</span> lim);</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="../../d5/d05/yiffy__fetch_8h.html#a5d6732ce337f794d14f9f2b835a0d2ef"> 28</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d5/d05/yiffy__fetch_8h.html#a5d6732ce337f794d14f9f2b835a0d2ef">aria2_download</a>(<span class="keywordtype">char</span> *tags, <span class="keywordtype">int</span> page, <span class="keywordtype">bool</span> is_nsfw, <span class="keywordtype">int</span> lim);</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="preprocessor">#endif </span><span class="comment">/* YIFFY_SEARCH_H */</span><span class="preprocessor"></span></div>
<div class="ttc" id="ayiffy__fetch_8h_html_a41f382b6bd05c9776641fb4bc5024afa"><div class="ttname"><a href="../../d5/d05/yiffy__fetch_8h.html#a41f382b6bd05c9776641fb4bc5024afa">fetch</a></div><div class="ttdeci">void fetch(char *tags, int page, char *command)</div><div class="ttdoc">Reads the configuration file, sets the options and sends a request to e621-e926. After taking the res...</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d14/fetch_8c_source.html#l00032">fetch.c:32</a></div></div>
<div class="ttc" id="ayiffy__fetch_8h_html_a5d6732ce337f794d14f9f2b835a0d2ef"><div class="ttname"><a href="../../d5/d05/yiffy__fetch_8h.html#a5d6732ce337f794d14f9f2b835a0d2ef">aria2_download</a></div><div class="ttdeci">void aria2_download(char *tags, int page, bool is_nsfw, int lim)</div><div class="ttdoc">downloads the API response by using aria2c, works with a system call</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/d60/aria2__download_8c_source.html#l00019">aria2_download.c:19</a></div></div>
<div class="ttc" id="ayiffy__fetch_8h_html_a5d6732ce337f794d14f9f2b835a0d2ef"><div class="ttname"><a href="../../d5/d05/yiffy__fetch_8h.html#a5d6732ce337f794d14f9f2b835a0d2ef">aria2_download</a></div><div class="ttdeci">void aria2_download(char *tags, int page, bool is_nsfw, int lim)</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
Expand Down
30 changes: 21 additions & 9 deletions docs/html/d6/d60/aria2__download_8c.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a5d6732ce337f794d14f9f2b835a0d2ef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d60/aria2__download_8c.html#a5d6732ce337f794d14f9f2b835a0d2ef">aria2_download</a> (char *tags, int page, bool is_nsfw, int lim)</td></tr>
<tr class="memdesc:a5d6732ce337f794d14f9f2b835a0d2ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">downloads the API response by using aria2c, works with a system call <a href="../../d6/d60/aria2__download_8c.html#a5d6732ce337f794d14f9f2b835a0d2ef">More...</a><br /></td></tr>
<tr class="separator:a5d6732ce337f794d14f9f2b835a0d2ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89f12219462c5d1dd6d1d1dc2896914d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d60/aria2__download_8c.html#a89f12219462c5d1dd6d1d1dc2896914d">aria2_download</a> (char *tags, bool is_nsfw, char *uname, char *apikey, int page, int lim)</td></tr>
<tr class="memdesc:a89f12219462c5d1dd6d1d1dc2896914d"><td class="mdescLeft">&#160;</td><td class="mdescRight">downloads the API response by using aria2c, works with a system call <a href="../../d6/d60/aria2__download_8c.html#a89f12219462c5d1dd6d1d1dc2896914d">More...</a><br /></td></tr>
<tr class="separator:a89f12219462c5d1dd6d1d1dc2896914d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Downloads the JSON file by using aria2c, works with the system function. </p>
Expand All @@ -153,8 +153,8 @@

<p class="definition">Definition in file <a class="el" href="../../d6/d60/aria2__download_8c_source.html">aria2_download.c</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a5d6732ce337f794d14f9f2b835a0d2ef" name="a5d6732ce337f794d14f9f2b835a0d2ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d6732ce337f794d14f9f2b835a0d2ef">&#9670;&nbsp;</a></span>aria2_download()</h2>
<a id="a89f12219462c5d1dd6d1d1dc2896914d" name="a89f12219462c5d1dd6d1d1dc2896914d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a89f12219462c5d1dd6d1d1dc2896914d">&#9670;&nbsp;</a></span>aria2_download()</h2>

<div class="memitem">
<div class="memproto">
Expand All @@ -168,14 +168,26 @@ <h2 class="memtitle"><span class="permalink"><a href="#a5d6732ce337f794d14f9f2b8
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>page</em>, </td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>is_nsfw</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>is_nsfw</em>, </td>
<td class="paramtype">char *&#160;</td>
<td class="paramname"><em>uname</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char *&#160;</td>
<td class="paramname"><em>apikey</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>page</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/d6/d60/aria2__download_8c.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var aria2__download_8c =
[
[ "aria2_download", "d6/d60/aria2__download_8c.html#a5d6732ce337f794d14f9f2b835a0d2ef", null ]
[ "aria2_download", "d6/d60/aria2__download_8c.html#a89f12219462c5d1dd6d1d1dc2896914d", null ]
];
Loading

0 comments on commit 982d961

Please sign in to comment.