Albirew/nyaa-pantsu
Albirew
/
nyaa-pantsu
Archivé
1
0
Bifurcation 0

Add a UML diagram for the present API (#774)

* Create model

Convert to SQL with Parse::Dia::SQL on CPAN.

* Document current API
Cette révision appartient à :
ipatrol 2017-05-27 03:16:51 -04:00 révisé par ewhal
Parent 9286653905
révision 2109c1be7d
3 fichiers modifiés avec 92 ajouts et 0 suppressions

1
.gitattributes externe Fichier normal
Voir le fichier

@ -0,0 +1 @@
*.dia binary

BIN
doc/api.dia Fichier normal

Fichier binaire non affiché.

91
doc/api.svg Fichier normal
Voir le fichier

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
<svg width="54cm" height="22cm" viewBox="9 44 1077 424" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g>
<rect style="fill: #ffffff" x="10" y="50" width="248.7" height="44"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="10" y="50" width="248.7" height="44"/>
<text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family:monospace;font-style:normal;font-weight:normal" x="134.35" y="66">&lt;&lt;object&gt;&gt;</text>
<text font-size="16" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:700" x="134.35" y="85">API</text>
<rect style="fill: #ffffff" x="10" y="94" width="248.7" height="52"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="10" y="94" width="248.7" height="52"/>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="13" y="108">+torrents: list</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="13" y="124">+queryRecordCount: number = int</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="13" y="140">+totalRecordCount: number = int</text>
<rect style="fill: #ffffff" x="10" y="146" width="248.7" height="8"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="10" y="146" width="248.7" height="8"/>
</g>
<g>
<rect style="fill: #ffffff" x="330" y="45" width="341.1" height="44"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="330" y="45" width="341.1" height="44"/>
<text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family:monospace;font-style:normal;font-weight:normal" x="500.55" y="61">&lt;&lt;object&gt;&gt;</text>
<text font-size="16" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:700" x="500.55" y="80">Torrent</text>
<rect style="fill: #ffffff" x="330" y="89" width="341.1" height="356"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="330" y="89" width="341.1" height="356"/>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="103">+id: string = int</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="119">+name: string</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="135">+status: number = int</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="151">+hash: string = SHA-1 Hex Digest</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="167">+date: string = ISO 8601 Date + Time</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="183">+filesize: number = int</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="199">+description: string = HTML</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="215">+comments: list</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="231">+sub_category: string = int</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="247">+category: string = int</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="263">+downloads: number = int</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="279">+uploader_id: number = int</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="295">+uploader_name: string</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="311">+uploader_old: string</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="327">+website_link: string = URL</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="343">+magnet: string = magnet URI</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="359">+torrent: string = URL</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="375">+seeders: number = int</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="391">+leechers: number = int</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="407">+completed: number = int</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="423">+last_scrape: string = ISO 8601 Date + Time</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="333" y="439">+file_list: list</text>
<rect style="fill: #ffffff" x="330" y="445" width="341.1" height="8"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="330" y="445" width="341.1" height="8"/>
</g>
<g>
<polyline style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="284.879,102 301.854,102 301.854,67 330,67 "/>
<polygon style="fill: #ffffff" points="259.708,102 273.708,97.2 287.708,102 273.708,106.8 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="259.708,102 273.708,97.2 287.708,102 273.708,106.8 "/>
</g>
<g>
<rect style="fill: #ffffff" x="797" y="97" width="287.2" height="44"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="797" y="97" width="287.2" height="44"/>
<text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family:monospace;font-style:normal;font-weight:normal" x="940.6" y="113">&lt;&lt;object&gt;&gt;</text>
<text font-size="16" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:700" x="940.6" y="132">Comment</text>
<rect style="fill: #ffffff" x="797" y="141" width="287.2" height="84"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="797" y="141" width="287.2" height="84"/>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="800" y="155">+username: string</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="800" y="171">+user_id: number = int</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="800" y="187">+user_avatar: string = URL</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="800" y="203">+content: string = HTML</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="800" y="219">+date: string = ISO 8601 Date + Time</text>
<rect style="fill: #ffffff" x="797" y="225" width="287.2" height="8"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="797" y="225" width="287.2" height="8"/>
</g>
<g>
<polyline style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="696.272,211 741.05,211 741.05,119 797,119 "/>
<polygon style="fill: #ffffff" points="671.1,211 685.1,206.2 699.1,211 685.1,215.8 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="671.1,211 685.1,206.2 699.1,211 685.1,215.8 "/>
</g>
<g>
<rect style="fill: #ffffff" x="781" y="352" width="117.8" height="44"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="781" y="352" width="117.8" height="44"/>
<text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family:monospace;font-style:normal;font-weight:normal" x="839.9" y="368">&lt;&lt;object&gt;&gt;</text>
<text font-size="16" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:700" x="839.9" y="387">File</text>
<rect style="fill: #ffffff" x="781" y="396" width="117.8" height="36"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="781" y="396" width="117.8" height="36"/>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="784" y="410">+path: string</text>
<text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="784" y="426">+filesize: int</text>
<rect style="fill: #ffffff" x="781" y="432" width="117.8" height="8"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="781" y="432" width="117.8" height="8"/>
</g>
<g>
<polyline style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="696.272,435 733.05,435 733.05,374 781,374 "/>
<polygon style="fill: #ffffff" points="671.1,435 685.1,430.2 699.1,435 685.1,439.8 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="671.1,435 685.1,430.2 699.1,435 685.1,439.8 "/>
</g>
</svg>

Après

Largeur:  |  Hauteur:  |  Taille: 10 KiB