raiseNotImplementedError("Subclass Service and impl the _run function")
@classmethod
@@ -79,7 +79,10 @@ class Service(JSONDataclass):
includeRaw (bool): Whether or not to include the raw data as sent from the service. If you don't need this data, turn this off; it's only the default for compatibility.
note=f"An error occured while retrieving data from {cls.getName()}."
print(ename)
@@ -124,12 +127,17 @@ class YouTubeResponse(JSONDataclass):
keys (list[YouTubeService]): An array with all the server responses. THIS IS DIFFERENT THAN BEFORE! Before, this would be an array of strings. You'd use the strings as keys. Now, this array has the data directly!
api_version (int): The API version. Breaking API changes are made by incrementing this.
verdict (dict): The verdict of the response. Has video, metaonly, and comments field, that are set to true if any archive was found where that was saved. Also has human_friendly field that has a simple verdict that can be used by people.
=Changelog=
API VERSION 3 -> 4:
The `rawraw` field is now only provided if you provide the `includeRaw` parameter and set it to True.
Example in a URL: <code>/api/v4/dQw4w9WgXcQ?includeRaw=true</code>
Please don't spam my servers. Anyone that spams too much may be banned. Contact me on Discord
(username: thetechrobo) or IRC (TheTechRobo on hackint, libera.chat, and OFTC) to discuss.
Please don't spam my servers. Anyone who makes too many requests may be banned. Contact me on Discord
(username: thetechrobo), IRC (TheTechRobo on hackint, libera.chat, and OFTC), or email (thetechrobo@proton.me) to discuss.
</div>
<br>
<h4>API Documentation</h4>
<h6>Call: GET <code>/api/:version/:videoid</code></h6>
<p>Current versions available: v2, v3</p>
<b>Fields</b>
{% if changelog[0] %}
<divid="Fcl">
<h6>Accepted parameters: <code>includeRaw</code> (set to include the <code>rawraw</code> field)</h6>
<p>Current versions available: v2, v3, v4. Documentation below only applies to the latest version.</p>
<u>Changelog</u>
<divid="changelog">
<ul>
{% for log, logitems in changelog[0].items() %}
{% if log %}
<li>Api version {{ log }}</li>
<ul>
{% for logitem in logitems %}
<li>{{ logitem }}</li>
{% endfor %}
<li>API version v3 -> 4:</li>
<ulid="root_3to4">
<li>The <code>rawraw</code> field is now only provided if you set the <code>includeRaw</code> parameter.</li>
</ul>
{% endif %}
{% endfor %}
</ul>
</div>
{% endif %}
<br>
<b>Fields</b>
<dl>
{% if fields is mapping %}
{% for field, value in fields.items() %}
@@ -67,24 +59,19 @@
Fail
{% endif %}
</dl>
<u>NOTE:</u> The <code>rawraw</code> field is only set if you set the <code>includeRaw</code> parameter. Example: <code>/api/v4/dQw4w9WgXcQ?includeRaw=true</code>. Please only enable this if you have to, as it will slow down loading.
</div>
<divclass="container">
<b>Service Objects</b>
{% if changelog[1] %}
<divid="Scl">
<divid="changelog2">
<u>Changelog</u>
<ul>
{% for log, logitems in changelog[1].items() %}
{% if log %}
<li>Api version {{ log }}</li>
<ul>
{% for logitem in logitems %}
<li>{{ logitem }}</li>
{% endfor %}
<li>API version 2 -> 3:</li>
<ulid="service_2to3">
<li>The <code>error</code> field is no longer a boolean; it now contains an error message if an error occured and null otherwise</li>