doc/Box/File.html in box-api-0.1.9 vs doc/Box/File.html in box-api-0.2.0
- old
+ new
@@ -4,11 +4,11 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
Class: Box::File
- — Documentation by YARD 0.7.2
+ — Documentation by YARD 0.7.3
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
@@ -94,20 +94,20 @@
</dl>
<div class="clear"></div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
- <p>
-Represents a file stored on Box. Any attributes or actions typical to a Box
-file can be accessed through this class.
-</p>
+
+<p>Represents a file stored on Box. Any attributes or actions typical to a Box
+file can be accessed through this class.</p>
</div>
</div>
<div class="tags">
+
</div>
@@ -145,13 +145,12 @@
- <span class="summary_desc"><div class='inline'><p>
-The string representation of this item.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>The string representation of this item.</p>
</div></span>
</li>
@@ -165,10 +164,33 @@
<ul class="summary">
<li class="public ">
<span class="summary_signature">
+ <a href="#add_comment-instance_method" title="#add_comment (instance method)">- (Comment) <strong>add_comment</strong>(message) </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Add a comment to the file.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
<a href="#download-instance_method" title="#download (instance method)">- (Object) <strong>download</strong>(path) </a>
</span>
@@ -178,21 +200,66 @@
- <span class="summary_desc"><div class='inline'><p>
-Download this file to the specified path.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Download this file to the specified path.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
+ <a href="#embed_code-instance_method" title="#embed_code (instance method)">- (String) <strong>embed_code</strong>(options = Hash.new) </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Request the HTML embed code for this file.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#get_comments-instance_method" title="#get_comments (instance method)">- (Array) <strong>get_comments</strong> </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Get the comments left on this file.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
<a href="#upload_copy-instance_method" title="#upload_copy (instance method)">- (File) <strong>upload_copy</strong>(path) </a>
</span>
@@ -202,13 +269,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Upload a new copy of this file.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Upload a new copy of this file.</p>
</div></span>
</li>
@@ -226,13 +292,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Overwrite this file, using the file at the specified path.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Overwrite this file, using the file at the specified path.</p>
</div></span>
</li>
@@ -246,11 +311,11 @@
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Item.html" title="Box::Item (class)">Item</a></span></h3>
- <p class="inherited"><span class='object_link'><a href="Item.html#copy-instance_method" title="Box::Item#copy (method)">#copy</a></span>, <span class='object_link'><a href="Item.html#delete-instance_method" title="Box::Item#delete (method)">#delete</a></span>, <span class='object_link'><a href="Item.html#description-instance_method" title="Box::Item#description (method)">#description</a></span>, <span class='object_link'><a href="Item.html#force_cached_info-instance_method" title="Box::Item#force_cached_info (method)">#force_cached_info</a></span>, <span class='object_link'><a href="Item.html#id-instance_method" title="Box::Item#id (method)">#id</a></span>, <span class='object_link'><a href="Item.html#info-instance_method" title="Box::Item#info (method)">#info</a></span>, <span class='object_link'><a href="Item.html#initialize-instance_method" title="Box::Item#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Item.html#method_missing-instance_method" title="Box::Item#method_missing (method)">#method_missing</a></span>, <span class='object_link'><a href="Item.html#move-instance_method" title="Box::Item#move (method)">#move</a></span>, <span class='object_link'><a href="Item.html#path-instance_method" title="Box::Item#path (method)">#path</a></span>, <span class='object_link'><a href="Item.html#rename-instance_method" title="Box::Item#rename (method)">#rename</a></span>, <span class='object_link'><a href="Item.html#type-instance_method" title="Box::Item#type (method)">#type</a></span>, <span class='object_link'><a href="Item.html#types-class_method" title="Box::Item.types (method)">types</a></span>, <span class='object_link'><a href="Item.html#types-instance_method" title="Box::Item#types (method)">#types</a></span></p>
+ <p class="inherited"><span class='object_link'><a href="Item.html#copy-instance_method" title="Box::Item#copy (method)">#copy</a></span>, <span class='object_link'><a href="Item.html#delete-instance_method" title="Box::Item#delete (method)">#delete</a></span>, <span class='object_link'><a href="Item.html#force_cached_info-instance_method" title="Box::Item#force_cached_info (method)">#force_cached_info</a></span>, <span class='object_link'><a href="Item.html#id-instance_method" title="Box::Item#id (method)">#id</a></span>, <span class='object_link'><a href="Item.html#info-instance_method" title="Box::Item#info (method)">#info</a></span>, <span class='object_link'><a href="Item.html#initialize-instance_method" title="Box::Item#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Item.html#method_missing-instance_method" title="Box::Item#method_missing (method)">#method_missing</a></span>, <span class='object_link'><a href="Item.html#move-instance_method" title="Box::Item#move (method)">#move</a></span>, <span class='object_link'><a href="Item.html#path-instance_method" title="Box::Item#path (method)">#path</a></span>, <span class='object_link'><a href="Item.html#rename-instance_method" title="Box::Item#rename (method)">#rename</a></span>, <span class='object_link'><a href="Item.html#respond_to%3F-instance_method" title="Box::Item#respond_to? (method)">#respond_to?</a></span>, <span class='object_link'><a href="Item.html#set_description-instance_method" title="Box::Item#set_description (method)">#set_description</a></span>, <span class='object_link'><a href="Item.html#type-instance_method" title="Box::Item#type (method)">#type</a></span>, <span class='object_link'><a href="Item.html#types-class_method" title="Box::Item.types (method)">types</a></span>, <span class='object_link'><a href="Item.html#types-instance_method" title="Box::Item#types (method)">#types</a></span></p>
<div id="constructor_details" class="method_details_list">
<h2>Constructor Details</h2>
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="Item.html#initialize-instance_method" title="Box::Item#initialize (method)">Box::Item</a></span></p>
@@ -278,32 +343,31 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-The string representation of this item.
-</p>
+
+<p>The string representation of this item.</p>
</div>
</div>
<div class="tags">
- <h3>Returns:</h3>
+
+<h3>Returns:</h3>
<ul class="return">
<li>
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The string representation of this item.
-</p>
+ <div class='inline'>
+<p>The string representation of this item.</p>
</div>
</li>
</ul>
@@ -330,21 +394,81 @@
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
- <p class="signature first" id="download-instance_method">
+ <p class="signature first" id="add_comment-instance_method">
+ - (<tt><span class='object_link'><a href="Comment.html" title="Box::Comment (class)">Comment</a></span></tt>) <strong>add_comment</strong>(message)
+
+
+
+</p><div class="docstring">
+ <div class="discussion">
+
+<p>Add a comment to the file.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<h3>Returns:</h3>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt><span class='object_link'><a href="Comment.html" title="Box::Comment (class)">Comment</a></span></tt>)</span>
+
+
+
+ —
+ <div class='inline'>
+<p>The created comment.</p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+57
+58
+59
+60
+61</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/box/file.rb', line 57</span>
+
+<span class='kw'>def</span> <span class='id add_comment'>add_comment</span><span class='lparen'>(</span><span class='id message'>message</span><span class='rparen'>)</span>
+ <span class='id response'>response</span> <span class='op'>=</span> <span class='ivar'>@api</span><span class='period'>.</span><span class='id add_comment'>add_comment</span><span class='lparen'>(</span><span class='id type'>type</span><span class='comma'>,</span> <span class='id id'>id</span><span class='comma'>,</span> <span class='id message'>message</span><span class='rparen'>)</span>
+
+ <span class='const'>Comment</span><span class='period'>.</span><span class='id create'>create</span><span class='lparen'>(</span><span class='ivar'>@api</span><span class='comma'>,</span> <span class='id response'>response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>comment</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id first'>first</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <p class="signature " id="download-instance_method">
+
- (<tt>Object</tt>) <strong>download</strong>(path)
</p><div class="docstring">
<div class="discussion">
- <p>
-Download this file to the specified path.
-</p>
+
+<p>Download this file to the specified path.</p>
</div>
</div>
<div class="tags">
@@ -359,19 +483,19 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The path to write the file.
-</p>
+ <div class='inline'>
+<p>The path to write the file.</p>
</div>
</li>
</ul>
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
@@ -390,22 +514,166 @@
</tr>
</table>
</div>
<div class="method_details ">
+ <p class="signature " id="embed_code-instance_method">
+
+ - (<tt>String</tt>) <strong>embed_code</strong>(options = Hash.new)
+
+
+
+</p><div class="docstring">
+ <div class="discussion">
+
+<p>Request the HTML embed code for this file.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+ <h3>Parameters:</h3>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>options</span>
+
+
+ <span class='type'>(<tt>Optional</tt>, <tt>Hash{:allow_download,:allow_print,:allow_share,
+:width,:height,:color => String}</tt>)</span>
+
+
+ <em class="default">(defaults to: <tt>Hash.new</tt>)</em>
+
+
+ —
+ <div class='inline'>
+<p>Options to use when generating the embed code.</p>
+</div>
+
+ </li>
+
+</ul>
+
+<h3>Returns:</h3>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>String</tt>)</span>
+
+
+
+ —
+ <div class='inline'>
+<p>HTML code to use to embed the file.</p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+70
+71
+72</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/box/file.rb', line 70</span>
+
+<span class='kw'>def</span> <span class='id embed_code'>embed_code</span><span class='lparen'>(</span><span class='id options'>options</span> <span class='op'>=</span> <span class='const'>Hash</span><span class='period'>.</span><span class='id new'>new</span><span class='rparen'>)</span>
+ <span class='ivar'>@api</span><span class='period'>.</span><span class='id file_embed'>file_embed</span><span class='lparen'>(</span><span class='id id'>id</span><span class='comma'>,</span> <span class='id options'>options</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>file_embed_html</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <p class="signature " id="get_comments-instance_method">
+
+ - (<tt>Array</tt>) <strong>get_comments</strong>
+
+
+
+</p><div class="docstring">
+ <div class="discussion">
+
+<p>Get the comments left on this file.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+
+<h3>Returns:</h3>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Array</tt>)</span>
+
+
+
+ —
+ <div class='inline'>
+<p>An array of <span class='object_link'><a href="Comment.html" title="Box::Comment (class)">Comment</a></span>s.</p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+46
+47
+48
+49
+50
+51
+52</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/box/file.rb', line 46</span>
+
+<span class='kw'>def</span> <span class='id get_comments'>get_comments</span>
+ <span class='id comments'>comments</span> <span class='op'>=</span> <span class='ivar'>@api</span><span class='period'>.</span><span class='id get_comments'>get_comments</span><span class='lparen'>(</span><span class='id type'>type</span><span class='comma'>,</span> <span class='id id'>id</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>comments</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
+
+ <span class='id comments'>comments</span> <span class='op'>=</span> <span class='const'>Comment</span><span class='period'>.</span><span class='id create'>create</span><span class='lparen'>(</span><span class='ivar'>@api</span><span class='comma'>,</span> <span class='id comments'>comments</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>comment</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id comments'>comments</span>
+
+ <span class='ivar'>@data</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>comments</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id comments'>comments</span> <span class='op'>||</span> <span class='const'>Array</span><span class='period'>.</span><span class='id new'>new</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
<p class="signature " id="upload_copy-instance_method">
- (<tt><span class='object_link'><a href="" title="Box::File (class)">File</a></span></tt>) <strong>upload_copy</strong>(path)
</p><div class="docstring">
<div class="discussion">
- <p>
-Upload a new copy of this file. The name will be “file (#).ext”
-for the each additional copy.
-</p>
+
+<p>Upload a new copy of this file. The name will be "file (#).ext" for the
+each additional copy.</p>
</div>
</div>
<div class="tags">
@@ -420,18 +688,18 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The path to the file to upload.
-</p>
+ <div class='inline'>
+<p>The path to the file to upload.</p>
</div>
</li>
</ul>
+
<h3>Returns:</h3>
<ul class="return">
<li>
@@ -439,13 +707,12 @@
<span class='type'>(<tt><span class='object_link'><a href="" title="Box::File (class)">File</a></span></tt>)</span>
—
- <div class='inline'><p>
-The newly created file.
-</p>
+ <div class='inline'>
+<p>The newly created file.</p>
</div>
</li>
</ul>
@@ -484,13 +751,12 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Overwrite this file, using the file at the specified path
-</p>
+
+<p>Overwrite this file, using the file at the specified path</p>
</div>
</div>
<div class="tags">
@@ -505,18 +771,18 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The path to the file to upload.
-</p>
+ <div class='inline'>
+<p>The path to the file to upload.</p>
</div>
</li>
</ul>
+
<h3>Returns:</h3>
<ul class="return">
<li>
@@ -524,13 +790,12 @@
<span class='type'>(<tt><span class='object_link'><a href="" title="Box::File (class)">File</a></span></tt>)</span>
—
- <div class='inline'><p>
-self
-</p>
+ <div class='inline'>
+<p>self</p>
</div>
</li>
</ul>
@@ -569,12 +834,12 @@
</div>
</div>
<div id="footer">
- Generated on Mon Aug 8 13:05:22 2011 by
+ Generated on Tue Nov 8 15:32:23 2011 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
- 0.7.2 (ruby-1.9.2).
+ 0.7.3 (ruby-1.9.3).
</div>
</body>
</html>
\ No newline at end of file