Skip to content

Commit

Permalink
[doc] Add documentation for Backend::Api::Published
Browse files Browse the repository at this point in the history
  • Loading branch information
Moises Deniz Aleman committed Oct 17, 2017
1 parent b9e0a9f commit 2d33a8f
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/api/lib/backend/api/published.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# API for accessing to the backend
module Backend
module Api
# Class that connect to endpoints related to the published repositories
class Published
extend Backend::ConnectionHelper

# Returns the download url for a repository
# @param project [String] Projects name that owns the repository.
# @param repository [String] Name of the repository.
# @return [String] XML with the published path for the repository provided
def self.download_url_for_repository(project, repository)
get(['/published/:project/:repository', project, repository], params: { view: :publishedpath })
end
Expand Down
77 changes: 71 additions & 6 deletions src/api/lib/backend/doc/Backend/Api/Published.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,18 @@

</div>

<h2>Overview</h2><div class="docstring">
<div class="discussion">

<p>Class that connect to endpoints related to the published repositories</p>


</div>
</div>
<div class="tags">


</div>



Expand All @@ -122,7 +133,7 @@ <h2>
<li class="public ">
<span class="summary_signature">

<a href="#download_url_for_repository-class_method" title="download_url_for_repository (class method)">.<strong>download_url_for_repository</strong>(project, repository) &#x21d2; Object </a>
<a href="#download_url_for_repository-class_method" title="download_url_for_repository (class method)">.<strong>download_url_for_repository</strong>(project, repository) &#x21d2; String </a>



Expand Down Expand Up @@ -161,7 +172,7 @@ <h2>Class Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="download_url_for_repository-class_method">

.<strong>download_url_for_repository</strong>(project, repository) &#x21d2; <tt>Object</tt>
.<strong>download_url_for_repository</strong>(project, repository) &#x21d2; <tt>String</tt>



Expand All @@ -176,20 +187,74 @@ <h3 class="signature first" id="download_url_for_repository-class_method">
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">

<li>

<span class='name'>project</span>


<span class='type'>(<tt>String</tt>)</span>



&mdash;
<div class='inline'>
<p>Projects name that owns the repository.</p>
</div>

</li>

<li>

<span class='name'>repository</span>


<span class='type'>(<tt>String</tt>)</span>



&mdash;
<div class='inline'>
<p>Name of the repository.</p>
</div>

</li>

</ul>

<p class="tag_title">Returns:</p>
<ul class="return">

<li>


<span class='type'>(<tt>String</tt>)</span>



&mdash;
<div class='inline'>
<p>XML with the published path for the repository provided</p>
</div>

</li>

</ul>

</div><table class="source_code">
<tr>
<td>
<pre class="lines">


8
9
10</pre>
11
12
13</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'api/published.rb', line 8</span>
<pre class="code"><span class="info file"># File 'api/published.rb', line 11</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_download_url_for_repository'>download_url_for_repository</span><span class='lparen'>(</span><span class='id identifier rubyid_project'>project</span><span class='comma'>,</span> <span class='id identifier rubyid_repository'>repository</span><span class='rparen'>)</span>
<span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/published/:project/:repository</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_project'>project</span><span class='comma'>,</span> <span class='id identifier rubyid_repository'>repository</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>params:</span> <span class='lbrace'>{</span> <span class='label'>view:</span> <span class='symbol'>:publishedpath</span> <span class='rbrace'>}</span><span class='rparen'>)</span>
Expand Down

0 comments on commit 2d33a8f

Please sign in to comment.