Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Commit

Permalink
Request objects in CUs (#117)
Browse files Browse the repository at this point in the history
* RateRaidRequest and its documentation

* GradeRaidRequest and its documentation

* Fixed lint reported issues

* ListFriendsRequest and its documentation

* named arguments in constructor with just one param to be more semantic

* ListGangsRequest (from OutLaw) and its documentation

* InviteFriendRequest and some changes plus docu

* Class diagram up to date again
  • Loading branch information
rmuhamed committed Dec 29, 2019
1 parent 0c9d3c8 commit 405034b
Show file tree
Hide file tree
Showing 31 changed files with 174 additions and 76 deletions.
Binary file modified doc/build/doctrees/application.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/design.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/domain.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified doc/build/doctrees/index.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/infrastructure.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/introduction.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/tools.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/usage.doctree
Binary file not shown.
Binary file not shown.
31 changes: 15 additions & 16 deletions doc/build/html/application.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,20 +152,23 @@ <h2>Outlaw<a class="headerlink" href="#outlaw" title="Permalink to this headline

<span class="target" id="module-thesheriff.application.outlaw.invite_friend"><span id="invite-friend"></span></span><dl class="class">
<dt id="thesheriff.application.outlaw.invite_friend.InviteFriend">
<em class="property">class </em><code class="sig-prename descclassname">thesheriff.application.outlaw.invite_friend.</code><code class="sig-name descname">InviteFriend</code><span class="sig-paren">(</span><em class="sig-param">mail_notifier: thesheriff.domain.mail.notifier.mail_notifier.MailNotifier</em><span class="sig-paren">)</span><a class="headerlink" href="#thesheriff.application.outlaw.invite_friend.InviteFriend" title="Permalink to this definition"></a></dt>
<em class="property">class </em><code class="sig-prename descclassname">thesheriff.application.outlaw.invite_friend.</code><code class="sig-name descname">InviteFriend</code><span class="sig-paren">(</span><em class="sig-param">outlaw_repository: thesheriff.domain.outlaw.repository.outlaw_repository.OutlawRepository</em>, <em class="sig-param">mail_notifier: thesheriff.domain.mail.notifier.mail_notifier.MailNotifier</em><span class="sig-paren">)</span><a class="headerlink" href="#thesheriff.application.outlaw.invite_friend.InviteFriend" title="Permalink to this definition"></a></dt>
<dd><p>Class InviteFriend implements the invite a friend use case.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>mail_notifier</strong> (<a class="reference internal" href="domain.html#thesheriff.domain.mail.notifier.mail_notifier.MailNotifier" title="thesheriff.domain.mail.notifier.mail_notifier.MailNotifier"><em>MailNotifier</em></a>) – Notifier object to handle email notifications.</p>
<dd class="field-odd"><ul class="simple">
<li><p><strong>outlaw_repository</strong> (<em>OutLawRepository</em>) – Associated repo to retrieve outlaw by his id.</p></li>
<li><p><strong>mail_notifier</strong> (<a class="reference internal" href="domain.html#thesheriff.domain.mail.notifier.mail_notifier.MailNotifier" title="thesheriff.domain.mail.notifier.mail_notifier.MailNotifier"><em>MailNotifier</em></a>) – Notifier object to handle email notifications.</p></li>
</ul>
</dd>
</dl>
<dl class="method">
<dt id="thesheriff.application.outlaw.invite_friend.InviteFriend.execute">
<code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param">receiver_mail_address</em><span class="sig-paren">)</span><a class="headerlink" href="#thesheriff.application.outlaw.invite_friend.InviteFriend.execute" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param">request: thesheriff.application.outlaw.request.invite_friend_request.InviteFriendRequest</em><span class="sig-paren">)</span><a class="headerlink" href="#thesheriff.application.outlaw.invite_friend.InviteFriend.execute" title="Permalink to this definition"></a></dt>
<dd><p>execute is the actual action of the Invite Friend use case.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>receiver_mail_address</strong> (<em>String</em>) – The address to write on the TO field.</p>
<dd class="field-odd"><p><strong>request</strong> (<em>InviteFriendRequest</em>) – The address to write on the TO field.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>No value returned.</p>
Expand Down Expand Up @@ -220,11 +223,11 @@ <h2>Outlaw<a class="headerlink" href="#outlaw" title="Permalink to this headline
</dl>
<dl class="method">
<dt id="thesheriff.application.outlaw.list_friends.ListFriends.execute">
<code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param">outlaw_id: int</em><span class="sig-paren">)</span> &#x2192; List[thesheriff.domain.outlaw.outlaw.Outlaw]<a class="headerlink" href="#thesheriff.application.outlaw.list_friends.ListFriends.execute" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param">request: thesheriff.application.outlaw.request.list_friends_request.ListFriendsRequest</em><span class="sig-paren">)</span> &#x2192; List[thesheriff.domain.outlaw.outlaw.Outlaw]<a class="headerlink" href="#thesheriff.application.outlaw.list_friends.ListFriends.execute" title="Permalink to this definition"></a></dt>
<dd><p>execute is the actual action of the List Outlaw’s Friends use case.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>outlaw_id</strong> (<em>Integer</em>) – ID of the Outlaw for which to list friends.</p>
<dd class="field-odd"><p><strong>request</strong> (<em>ListFriendsRequest</em>) – object holding the data to retrieve outlaw’s friends.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The list of friends.</p>
Expand All @@ -248,11 +251,11 @@ <h2>Outlaw<a class="headerlink" href="#outlaw" title="Permalink to this headline
</dl>
<dl class="method">
<dt id="thesheriff.application.outlaw.list_gangs.ListGangs.execute">
<code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param">outlaw_id: int</em><span class="sig-paren">)</span> &#x2192; List[thesheriff.domain.gang.gang.Gang]<a class="headerlink" href="#thesheriff.application.outlaw.list_gangs.ListGangs.execute" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param">request: thesheriff.application.outlaw.request.list_gangs_request.ListGangsRequest</em><span class="sig-paren">)</span> &#x2192; List[thesheriff.domain.gang.gang.Gang]<a class="headerlink" href="#thesheriff.application.outlaw.list_gangs.ListGangs.execute" title="Permalink to this definition"></a></dt>
<dd><p>execute is the actual action of the List Gangs use case.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>outlaw_id</strong> (<em>Integer</em>) – ID of the Outlaw performing the action.</p>
<dd class="field-odd"><p><strong>request</strong> (<em>ListGangsRequest</em>) – request object holding data to perform the action.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The list of gangs.</p>
Expand All @@ -279,15 +282,11 @@ <h2>Outlaw<a class="headerlink" href="#outlaw" title="Permalink to this headline
</dl>
<dl class="method">
<dt id="thesheriff.application.outlaw.rate_raid.RateRaid.execute">
<code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param">raid_id: int</em>, <em class="sig-param">outlaw_id: int</em>, <em class="sig-param">score: thesheriff.domain.outlaw.score.Score</em><span class="sig-paren">)</span> &#x2192; NoReturn<a class="headerlink" href="#thesheriff.application.outlaw.rate_raid.RateRaid.execute" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param">request: thesheriff.application.raid.request.rate_raid_request.RateRaidRequest</em><span class="sig-paren">)</span> &#x2192; NoReturn<a class="headerlink" href="#thesheriff.application.outlaw.rate_raid.RateRaid.execute" title="Permalink to this definition"></a></dt>
<dd><p>execute is the actual action of the Raid rating use case.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>raid_id</strong> (<em>Integer</em>) – ID of the Raid to be rated</p></li>
<li><p><strong>outlaw_id</strong> (<em>Integer</em>) – ID of the Outlaw performing the action.</p></li>
<li><p><strong>score</strong> (<a class="reference internal" href="domain.html#thesheriff.domain.outlaw.score.Score" title="thesheriff.domain.outlaw.score.Score"><em>Score</em></a>) – Raid’s score.</p></li>
</ul>
<dd class="field-odd"><p><strong>request</strong> (<em>RateRaidRequest</em>) – the RateRaidRequest holding all the data</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>No value returned.</p>
Expand Down Expand Up @@ -388,11 +387,11 @@ <h2>Raid<a class="headerlink" href="#raid" title="Permalink to this headline">¶
</dl>
<dl class="method">
<dt id="thesheriff.application.raid.grade_raid.GradeRaid.execute">
<code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param">raid_id: int</em><span class="sig-paren">)</span> &#x2192; float<a class="headerlink" href="#thesheriff.application.raid.grade_raid.GradeRaid.execute" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param">request: thesheriff.application.raid.request.grade_raid_request.GradeRaidRequest</em><span class="sig-paren">)</span> &#x2192; float<a class="headerlink" href="#thesheriff.application.raid.grade_raid.GradeRaid.execute" title="Permalink to this definition"></a></dt>
<dd><p>execute is the actual action of the Grade a Raid use case.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>raid_id</strong> (<em>Raid id</em>) – Id of Raid entity to be graded.</p>
<dd class="field-odd"><p><strong>request</strong> (<em>a GradeRaidRequest</em>) – Id of Raid entity to be graded.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The raid grade.</p>
Expand Down
2 changes: 1 addition & 1 deletion doc/build/html/infrastructure.html
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ <h3>thesheriff.infrastructure.controllers.outlaw_controller<a class="headerlink"
</li>
<li><p><em>/&lt;prefix&gt;/outlaw/invite_friend/</em> (POST)</p>
<p><strong>Request Example:</strong></p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> curl localhost:5000/api/&lt;version&gt;/outlaw/invite_friend/ <span class="se">\</span>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> curl localhost:5000/api/&lt;version&gt;/outlaw/1/invite_friend/ <span class="se">\</span>
-X POST --data @examples/json/invite_friend.json <span class="se">\</span>
-H <span class="s1">&#39;Content-Type: application/json&#39;</span>
</pre></div>
Expand Down

0 comments on commit 405034b

Please sign in to comment.