doc/Box/Api.html in box-api-0.1.9 vs doc/Box/Api.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::Api
- — 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" />
@@ -98,21 +98,21 @@
</dl>
<div class="clear"></div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
- <p>
-A wrapper and interface to the Box api. Please visit the Box developers
+
+<p>A wrapper and interface to the Box api. Please visit the Box developers
site for a full explaination of what each of the Box api methods expect and
-perform. TODO: Link to the site.
-</p>
+perform. TODO: Link to the site.</p>
</div>
</div>
<div class="tags">
+
</div><h2>Defined Under Namespace</h2>
<p class="children">
@@ -144,13 +144,12 @@
- <span class="summary_desc"><div class='inline'><p>
-The base url of the box api.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>The base url of the box api.</p>
</div></span>
</li>
@@ -171,13 +170,12 @@
- <span class="summary_desc"><div class='inline'><p>
-The upload url of the box api.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>The upload url of the box api.</p>
</div></span>
</li>
@@ -209,13 +207,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Given a status, returning a cooresponding Exception class.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Given a status, returning a cooresponding Exception class.</p>
</div></span>
</li>
@@ -229,10 +226,33 @@
<ul class="summary">
<li class="public ">
<span class="summary_signature">
+ <a href="#add_comment-instance_method" title="#add_comment (instance method)">- (Object) <strong>add_comment</strong>(target, target_id, message) </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Adds a new comment to the given item.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
<a href="#copy-instance_method" title="#copy (instance method)">- (Object) <strong>copy</strong>(target, target_id, destination_id) </a>
</span>
@@ -242,13 +262,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Copy the the item to a new destination.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Copy the the item to a new destination.</p>
</div></span>
</li>
@@ -266,13 +285,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Create a new folder.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Create a new folder.</p>
</div></span>
</li>
@@ -290,21 +308,43 @@
- <span class="summary_desc"><div class='inline'><p>
-Delete the item.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Delete the item.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
+ <a href="#delete_comment-instance_method" title="#delete_comment (instance method)">- (Object) <strong>delete_comment</strong>(comment_id) </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Deletes a given comment.</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, file_id, version = nil) </a>
</span>
@@ -314,21 +354,43 @@
- <span class="summary_desc"><div class='inline'><p>
-Download the file to the given path.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Download the file to the given path.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
+ <a href="#file_embed-instance_method" title="#file_embed (instance method)">- (Object) <strong>file_embed</strong>(id, options = Hash.new) </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Request the HTML embed code for a file.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
<a href="#get_account_info-instance_method" title="#get_account_info (instance method)">- (Object) <strong>get_account_info</strong> </a>
</span>
@@ -338,13 +400,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Get the user’s account info.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Get the user's account info.</p>
</div></span>
</li>
@@ -362,13 +423,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Get the entire tree of a given folder.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Get the entire tree of a given folder.</p>
</div></span>
</li>
@@ -386,21 +446,43 @@
- <span class="summary_desc"><div class='inline'><p>
-Request an auth token given a ticket.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Request an auth token given a ticket.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
+ <a href="#get_comments-instance_method" title="#get_comments (instance method)">- (Object) <strong>get_comments</strong>(target, target_id) </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'>
+<p>Gets the comments posted on the given item.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
<a href="#get_file_info-instance_method" title="#get_file_info (instance method)">- (Object) <strong>get_file_info</strong>(file_id) </a>
</span>
@@ -410,13 +492,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Get the file info.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Get the file info.</p>
</div></span>
</li>
@@ -434,13 +515,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Request a ticket for authorization.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Request a ticket for authorization.</p>
</div></span>
</li>
@@ -458,13 +538,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Handle the response of the request.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Handle the response of the request.</p>
</div></span>
</li>
@@ -484,13 +563,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Create a new API object using the given parameters.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Create a new API object using the given parameters.</p>
</div></span>
</li>
@@ -508,13 +586,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Request the user be logged out.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Request the user be logged out.</p>
</div></span>
</li>
@@ -532,13 +609,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Move the item to a new destination.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Move the item to a new destination.</p>
</div></span>
</li>
@@ -556,13 +632,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Upload a new copy of the given file.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Upload a new copy of the given file.</p>
</div></span>
</li>
@@ -580,13 +655,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Overwrite the given file with a new one.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Overwrite the given file with a new one.</p>
</div></span>
</li>
@@ -604,13 +678,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Make a download request.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Make a download request.</p>
</div></span>
</li>
@@ -628,13 +701,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Make a raw request.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Make a raw request.</p>
</div></span>
</li>
@@ -652,13 +724,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Make a normal REST request.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Make a normal REST request.</p>
</div></span>
</li>
@@ -676,13 +747,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Make an upload request.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Make an upload request.</p>
</div></span>
</li>
@@ -700,13 +770,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Register a new user.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Register a new user.</p>
</div></span>
</li>
@@ -724,13 +793,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Rename the item.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Rename the item.</p>
</div></span>
</li>
@@ -748,13 +816,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Add the auth token to every request.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Add the auth token to every request.</p>
</div></span>
</li>
@@ -772,13 +839,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Set the item description.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Set the item description.</p>
</div></span>
</li>
@@ -796,13 +862,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Upload the file to the specified folder.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Upload the file to the specified folder.</p>
</div></span>
</li>
@@ -820,13 +885,12 @@
- <span class="summary_desc"><div class='inline'><p>
-Verify a registration email.
-</p>
+ <span class="summary_desc"><div class='inline'>
+<p>Verify a registration email.</p>
</div></span>
</li>
@@ -847,23 +911,21 @@
</p><div class="docstring">
<div class="discussion">
<div class="note notetag">
<strong>Note:</strong>
- <div class='inline'><p>
-Chances are that if the Box api is updated or moves location, this class
+ <div class='inline'>
+<p>Chances are that if the Box api is updated or moves location, this class
will no longer work. However, the option to change the defaults still
-remains.
-</p>
+remains.</p>
</div>
</div>
-<p>
-Create a new API object using the given parameters.
-</p>
+<p>Create a new API object using the given parameters.</p>
+
</div>
</div>
<div class="tags">
<h3>Parameters:</h3>
<ul class="param">
@@ -876,15 +938,14 @@
<span class='type'>(<tt>String</tt>, <tt><span class='object_link'><a href="" title="Box::Api (class)">Api</a></span></tt>)</span>
—
- <div class='inline'><p>
-The api key for your application. You can request one on the Box developer
+ <div class='inline'>
+<p>The api key for your application. You can request one on the Box developer
website at <a href="http://www.box.net/developers/services" target="_parent" title="http://www.box.net/developers/services">http://www.box.net/developers/services</a>. If an <span class='object_link'><a href="" title="Box::Api (class)">Box::Api</a></span> instance
-is passed instead, its key is used.
-</p>
+is passed instead, its key is used.</p>
</div>
</li>
<li>
@@ -897,13 +958,12 @@
<em class="default">(defaults to: <tt>'https://box.net'</tt>)</em>
—
- <div class='inline'><p>
-the url of the Box api.
-</p>
+ <div class='inline'>
+<p>the url of the Box api.</p>
</div>
</li>
<li>
@@ -916,13 +976,12 @@
<em class="default">(defaults to: <tt>'https://upload.box.net'</tt>)</em>
—
- <div class='inline'><p>
-the url of the upload host for the Box api.
-</p>
+ <div class='inline'>
+<p>the url of the upload host for the Box api.</p>
</div>
</li>
<li>
@@ -935,19 +994,19 @@
<em class="default">(defaults to: <tt>'1.0'</tt>)</em>
—
- <div class='inline'><p>
-the version of the Box api in use.
-</p>
+ <div class='inline'>
+<p>the version of the Box api in use.</p>
</div>
</li>
</ul>
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
@@ -988,32 +1047,31 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-The base url of the box api.
-</p>
+
+<p>The base url of the box api.</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 base url of the box api.
-</p>
+ <div class='inline'>
+<p>The base url of the box api.</p>
</div>
</li>
</ul>
@@ -1049,32 +1107,31 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-The upload url of the box api.
-</p>
+
+<p>The upload url of the box api.</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 upload url of the box api.
-</p>
+ <div class='inline'>
+<p>The upload url of the box api.</p>
</div>
</li>
</ul>
@@ -1114,13 +1171,12 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Given a status, returning a cooresponding Exception class.
-</p>
+
+<p>Given a status, returning a cooresponding Exception class.</p>
</div>
</div>
<div class="tags">
@@ -1135,18 +1191,18 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The failing status to look for.
-</p>
+ <div class='inline'>
+<p>The failing status to look for.</p>
</div>
</li>
</ul>
+
<h3>Returns:</h3>
<ul class="return">
<li>
@@ -1154,13 +1210,12 @@
<span class='type'>(<tt><span class='object_link'><a href="Api/Exception.html" title="Box::Api::Exception (class)">Exception</a></span></tt>)</span>
—
- <div class='inline'><p>
-A coorespondng Exception.
-</p>
+ <div class='inline'>
+<p>A coorespondng Exception.</p>
</div>
</li>
</ul>
@@ -1210,11 +1265,14 @@
72
73
74
75
76
-77</pre>
+77
+78
+79
+80</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/box/api/exceptions.rb', line 36</span>
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id get_exception'>get_exception</span><span class='lparen'>(</span><span class='id status'>status</span><span class='rparen'>)</span>
@@ -1253,10 +1311,13 @@
<span class='const'>UploadFailed</span>
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>not_enough_free_space</span><span class='tstring_end'>"</span></span>
<span class='const'>AccountExceeded</span>
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>filesize_limit_exceeded</span><span class='tstring_end'>"</span></span>
<span class='const'>SizeExceeded</span>
+ <span class='comment'># Comment specific responses
+</span> <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>get_comments_error</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>add_comment_error</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>delete_comment_error</span><span class='tstring_end'>"</span></span>
+ <span class='const'>Generic</span>
<span class='kw'>else</span>
<span class='const'>Unknown</span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
@@ -1269,32 +1330,121 @@
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
- <p class="signature first" id="copy-instance_method">
+ <p class="signature first" id="add_comment-instance_method">
+ - (<tt>Object</tt>) <strong>add_comment</strong>(target, target_id, message)
+
+
+
+</p><div class="docstring">
+ <div class="discussion">
+
+<p>Adds a new comment to the given item.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+ <h3>Parameters:</h3>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>target</span>
+
+
+ <span class='type'>(<tt>"file"</tt>)</span>
+
+
+
+ —
+ <div class='inline'>
+<p>The type of item.</p>
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>target_id</span>
+
+
+ <span class='type'>(<tt>String</tt>)</span>
+
+
+
+ —
+ <div class='inline'>
+<p>The id of the item to add to.</p>
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>message</span>
+
+
+ <span class='type'>(<tt>String</tt>)</span>
+
+
+
+ —
+ <div class='inline'>
+<p>The message to use.</p>
+</div>
+
+ </li>
+
+</ul>
+
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+315
+316
+317</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/box/api.rb', line 315</span>
+
+<span class='kw'>def</span> <span class='id add_comment'>add_comment</span><span class='lparen'>(</span><span class='id target'>target</span><span class='comma'>,</span> <span class='id target_id'>target_id</span><span class='comma'>,</span> <span class='id message'>message</span><span class='rparen'>)</span>
+ <span class='id query_rest'>query_rest</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>add_comment_ok</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:action</span> <span class='op'>=></span> <span class='symbol'>:add_comment</span><span class='comma'>,</span> <span class='symbol'>:target</span> <span class='op'>=></span> <span class='id target'>target</span><span class='comma'>,</span> <span class='symbol'>:target_id</span> <span class='op'>=></span> <span class='id target_id'>target_id</span><span class='comma'>,</span> <span class='symbol'>:message</span> <span class='op'>=></span> <span class='id message'>message</span><span class='rparen'>)</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <p class="signature " id="copy-instance_method">
+
- (<tt>Object</tt>) <strong>copy</strong>(target, target_id, destination_id)
</p><div class="docstring">
<div class="discussion">
<div class="note notetag">
<strong>Note:</strong>
- <div class='inline'><p>
-The api currently only supports copying files.
-</p>
+ <div class='inline'>
+<p>The api currently only supports copying files.</p>
</div>
</div>
-<p>
-Copy the the item to a new destination.
-</p>
+<p>Copy the the item to a new destination.</p>
+
</div>
</div>
<div class="tags">
<h3>Parameters:</h3>
<ul class="param">
@@ -1307,13 +1457,12 @@
<span class='type'>(<tt>"file"</tt>)</span>
—
- <div class='inline'><p>
-The type of item.
-</p>
+ <div class='inline'>
+<p>The type of item.</p>
</div>
</li>
<li>
@@ -1324,13 +1473,12 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The id of the item to copy.
-</p>
+ <div class='inline'>
+<p>The id of the item to copy.</p>
</div>
</li>
<li>
@@ -1341,19 +1489,19 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The id of the parent to copy to.
-</p>
+ <div class='inline'>
+<p>The id of the parent to copy to.</p>
</div>
</li>
</ul>
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
@@ -1380,13 +1528,12 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Create a new folder.
-</p>
+
+<p>Create a new folder.</p>
</div>
</div>
<div class="tags">
@@ -1401,13 +1548,12 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The id of the parent folder to use.
-</p>
+ <div class='inline'>
+<p>The id of the parent folder to use.</p>
</div>
</li>
<li>
@@ -1418,13 +1564,12 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The name of the newly created folder.
-</p>
+ <div class='inline'>
+<p>The name of the newly created folder.</p>
</div>
</li>
<li>
@@ -1435,19 +1580,19 @@
<span class='type'>(<tt>Integer</tt>)</span>
—
- <div class='inline'><p>
-The shared state of the new folder.
-</p>
+ <div class='inline'>
+<p>The shared state of the new folder.</p>
</div>
</li>
</ul>
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
@@ -1474,13 +1619,12 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Delete the item.
-</p>
+
+<p>Delete the item.</p>
</div>
</div>
<div class="tags">
@@ -1495,13 +1639,12 @@
<span class='type'>(<tt>"file"</tt>, <tt>"folder"</tt>)</span>
—
- <div class='inline'><p>
-The type of item.
-</p>
+ <div class='inline'>
+<p>The type of item.</p>
</div>
</li>
<li>
@@ -1512,19 +1655,19 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The id of the item to delete.
-</p>
+ <div class='inline'>
+<p>The id of the item to delete.</p>
</div>
</li>
</ul>
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
@@ -1543,10 +1686,69 @@
</tr>
</table>
</div>
<div class="method_details ">
+ <p class="signature " id="delete_comment-instance_method">
+
+ - (<tt>Object</tt>) <strong>delete_comment</strong>(comment_id)
+
+
+
+</p><div class="docstring">
+ <div class="discussion">
+
+<p>Deletes a given comment.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+ <h3>Parameters:</h3>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>comment_id</span>
+
+
+ <span class='type'>(<tt>String</tt>)</span>
+
+
+
+ —
+ <div class='inline'>
+<p>The id of the comment to delete.</p>
+</div>
+
+ </li>
+
+</ul>
+
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+322
+323
+324</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/box/api.rb', line 322</span>
+
+<span class='kw'>def</span> <span class='id delete_comment'>delete_comment</span><span class='lparen'>(</span><span class='id comment_id'>comment_id</span><span class='rparen'>)</span>
+ <span class='id query_rest'>query_rest</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>delete_comment_ok</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:action</span> <span class='op'>=></span> <span class='symbol'>:delete_comment</span><span class='comma'>,</span> <span class='symbol'>:target_id</span> <span class='op'>=></span> <span class='id comment_id'>comment_id</span><span class='rparen'>)</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, file_id, version = nil)
@@ -1554,21 +1756,19 @@
</p><div class="docstring">
<div class="discussion">
<div class="note notetag">
<strong>Note:</strong>
- <div class='inline'><p>
-You cannot download folders.
-</p>
+ <div class='inline'>
+<p>You cannot download folders.</p>
</div>
</div>
-<p>
-Download the file to the given path.
-</p>
+<p>Download the file to the given path.</p>
+
</div>
</div>
<div class="tags">
<h3>Parameters:</h3>
<ul class="param">
@@ -1581,13 +1781,12 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The path to write the file to.
-</p>
+ <div class='inline'>
+<p>The path to write the file to.</p>
</div>
</li>
<li>
@@ -1598,13 +1797,12 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The file id to download.
-</p>
+ <div class='inline'>
+<p>The file id to download.</p>
</div>
</li>
<li>
@@ -1617,19 +1815,19 @@
<em class="default">(defaults to: <tt>nil</tt>)</em>
—
- <div class='inline'><p>
-The version of the file to download.
-</p>
+ <div class='inline'>
+<p>The version of the file to download.</p>
</div>
</li>
</ul>
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
@@ -1652,27 +1850,105 @@
</tr>
</table>
</div>
<div class="method_details ">
+ <p class="signature " id="file_embed-instance_method">
+
+ - (<tt>Object</tt>) <strong>file_embed</strong>(id, options = Hash.new)
+
+
+
+</p><div class="docstring">
+ <div class="discussion">
+
+<p>Request the HTML embed code for a file.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+ <h3>Parameters:</h3>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>id</span>
+
+
+ <span class='type'>(<tt>String</tt>)</span>
+
+
+
+ —
+ <div class='inline'>
+<p>The id of the file to use.</p>
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>options</span>
+
+
+ <span class='type'>(<tt>Hash</tt>)</span>
+
+
+ <em class="default">(defaults to: <tt>Hash.new</tt>)</em>
+
+
+ —
+ <div class='inline'>
+<p>The properties for the generated preview code. See File#embed_code for a
+more detailed list of options.</p>
+</div>
+
+ </li>
+
+</ul>
+
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+331
+332
+333</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/box/api.rb', line 331</span>
+
+<span class='kw'>def</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='op'>=</span> <span class='const'>Hash</span><span class='period'>.</span><span class='id new'>new</span><span class='rparen'>)</span>
+ <span class='id query_rest'>query_rest</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>s_create_file_embed</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='symbol'>:action</span> <span class='op'>=></span> <span class='symbol'>:create_file_embed</span><span class='comma'>,</span> <span class='symbol'>:file_id</span> <span class='op'>=></span> <span class='id id'>id</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id merge'>merge</span><span class='lparen'>(</span><span class='id options'>options</span><span class='rparen'>)</span><span class='rparen'>)</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
<p class="signature " id="get_account_info-instance_method">
- (<tt>Object</tt>) <strong>get_account_info</strong>
</p><div class="docstring">
<div class="discussion">
- <p>
-Get the user’s account info.
-</p>
+
+<p>Get the user's account info.</p>
</div>
</div>
<div class="tags">
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
@@ -1702,33 +1978,29 @@
</p><div class="docstring">
<div class="discussion">
<div class="note todo">
<strong>TODO:</strong>
- <div class='inline'><p>
-Use zip compression to save bandwidth.
-</p>
+ <div class='inline'>
+<p>Use zip compression to save bandwidth.</p>
</div>
</div>
<div class="note notetag">
<strong>Note:</strong>
- <div class='inline'><p>
-This function can take a long time for large folders.
-</p>
+ <div class='inline'>
+<p>This function can take a long time for large folders.</p>
</div>
</div>
-<p>
-Get the entire tree of a given folder.
-</p>
-<p>
-TODO: document the possible arguments.
-</p>
+<p>Get the entire tree of a given folder.</p>
+<p>TODO: document the possible arguments.</p>
+
+
</div>
</div>
<div class="tags">
<h3>Parameters:</h3>
<ul class="param">
@@ -1741,13 +2013,12 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The id of the folder to use.
-</p>
+ <div class='inline'>
+<p>The id of the folder to use.</p>
</div>
</li>
<li>
@@ -1758,19 +2029,19 @@
<span class='type'>(<tt>Array</tt>)</span>
—
- <div class='inline'><p>
-The arguments to pass along to get_account_tree.
-</p>
+ <div class='inline'>
+<p>The arguments to pass along to get_account_tree.</p>
</div>
</li>
</ul>
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
@@ -1797,13 +2068,12 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Request an auth token given a ticket.
-</p>
+
+<p>Request an auth token given a ticket.</p>
</div>
</div>
<div class="tags">
@@ -1818,19 +2088,19 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-the ticket to use.
-</p>
+ <div class='inline'>
+<p>the ticket to use.</p>
</div>
</li>
</ul>
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
@@ -1849,21 +2119,95 @@
</tr>
</table>
</div>
<div class="method_details ">
+ <p class="signature " id="get_comments-instance_method">
+
+ - (<tt>Object</tt>) <strong>get_comments</strong>(target, target_id)
+
+
+
+</p><div class="docstring">
+ <div class="discussion">
+
+<p>Gets the comments posted on the given item.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+ <h3>Parameters:</h3>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>target</span>
+
+
+ <span class='type'>(<tt>"file"</tt>)</span>
+
+
+
+ —
+ <div class='inline'>
+<p>The type of item.</p>
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>target_id</span>
+
+
+ <span class='type'>(<tt>String</tt>)</span>
+
+
+
+ —
+ <div class='inline'>
+<p>The id of the item to get.</p>
+</div>
+
+ </li>
+
+</ul>
+
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+306
+307
+308</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/box/api.rb', line 306</span>
+
+<span class='kw'>def</span> <span class='id get_comments'>get_comments</span><span class='lparen'>(</span><span class='id target'>target</span><span class='comma'>,</span> <span class='id target_id'>target_id</span><span class='rparen'>)</span>
+ <span class='id query_rest'>query_rest</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>get_comments_ok</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:action</span> <span class='op'>=></span> <span class='symbol'>:get_comments</span><span class='comma'>,</span> <span class='symbol'>:target</span> <span class='op'>=></span> <span class='id target'>target</span><span class='comma'>,</span> <span class='symbol'>:target_id</span> <span class='op'>=></span> <span class='id target_id'>target_id</span><span class='rparen'>)</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
<p class="signature " id="get_file_info-instance_method">
- (<tt>Object</tt>) <strong>get_file_info</strong>(file_id)
</p><div class="docstring">
<div class="discussion">
- <p>
-Get the file info.
-</p>
+
+<p>Get the file info.</p>
</div>
</div>
<div class="tags">
@@ -1878,19 +2222,19 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The file id to get info for.
-</p>
+ <div class='inline'>
+<p>The file id to get info for.</p>
</div>
</li>
</ul>
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
@@ -1917,19 +2261,19 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Request a ticket for authorization
-</p>
+
+<p>Request a ticket for authorization</p>
</div>
</div>
<div class="tags">
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
@@ -1956,13 +2300,12 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Handle the response of the request.
-</p>
+
+<p>Handle the response of the request.</p>
</div>
</div>
<div class="tags">
@@ -1977,13 +2320,12 @@
<span class='type'>(<tt>Hash</tt>)</span>
—
- <div class='inline'><p>
-The parsed representation of the XML response.
-</p>
+ <div class='inline'>
+<p>The parsed representation of the XML response.</p>
</div>
</li>
<li>
@@ -1996,19 +2338,19 @@
<em class="default">(defaults to: <tt>nil</tt>)</em>
—
- <div class='inline'><p>
-the normal status expected to be returned. If the actual status does not
-match, an exception is thrown.
-</p>
+ <div class='inline'>
+<p>the normal status expected to be returned. If the actual status does not
+match, an exception is thrown.</p>
</div>
</li>
</ul>
+
<h3>Returns:</h3>
<ul class="return">
<li>
@@ -2016,13 +2358,12 @@
<span class='type'>(<tt>Hash</tt>)</span>
—
- <div class='inline'><p>
-The response if no errors were found.
-</p>
+ <div class='inline'>
+<p>The response if no errors were found.</p>
</div>
</li>
</ul>
@@ -2035,14 +2376,13 @@
<span class='type'>(<tt><span class='object_link'><a href="Api/Exception.html" title="Box::Api::Exception (class)">Exception</a></span></tt>, <tt><span class='object_link'><a href="Api/UnknownResponse.html" title="Box::Api::UnknownResponse (class)">UnknownResponse</a></span></tt>)</span>
—
- <div class='inline'><p>
-Raises an exception if the response status does not match the expected.
-This exception is determined by <span class='object_link'><a href="#get_exception-class_method" title="Box::Api.get_exception (method)">get_exception</a></span>
-</p>
+ <div class='inline'>
+<p>Raises an exception if the response status does not match the expected.
+This exception is determined by <span class='object_link'><a href="#get_exception-class_method" title="Box::Api.get_exception (method)">get_exception</a></span></p>
</div>
</li>
</ul>
@@ -2086,11 +2426,11 @@
</span> <span class='id exception'>exception</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id class'>class</span><span class='period'>.</span><span class='id get_exception'>get_exception</span><span class='lparen'>(</span><span class='id status'>status</span><span class='rparen'>)</span>
<span class='id raise'>raise</span> <span class='id exception'>exception</span><span class='comma'>,</span> <span class='id status'>status</span>
<span class='kw'>end</span>
<span class='kw'>end</span>
- <span class='id raise'>raise</span> <span class='const'>ErrorStatus</span><span class='comma'>,</span> <span class='id response'>response</span><span class='period'>.</span><span class='id code'>code</span> <span class='kw'>unless</span> <span class='id response'>response</span><span class='period'>.</span><span class='id success?'>success?</span> <span class='comment'># when the http return code is not normal
+ <span class='id raise'>raise</span> <span class='const'>ErrorStatus</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>HTTP code </span><span class='embexpr_beg'>#{</span> <span class='id response'>response</span><span class='period'>.</span><span class='id code'>code</span> <span class='rbrace'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='id response'>response</span><span class='period'>.</span><span class='id success?'>success?</span> <span class='comment'># when the http return code is not normal
</span> <span class='id response'>response</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
@@ -2103,19 +2443,19 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Request the user be logged out.
-</p>
+
+<p>Request the user be logged out.</p>
</div>
</div>
<div class="tags">
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
@@ -2142,13 +2482,12 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Move the item to a new destination.
-</p>
+
+<p>Move the item to a new destination.</p>
</div>
</div>
<div class="tags">
@@ -2163,13 +2502,12 @@
<span class='type'>(<tt>"file"</tt>, <tt>"folder"</tt>)</span>
—
- <div class='inline'><p>
-The type of item.
-</p>
+ <div class='inline'>
+<p>The type of item.</p>
</div>
</li>
<li>
@@ -2180,13 +2518,12 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The id of the item to move.
-</p>
+ <div class='inline'>
+<p>The id of the item to move.</p>
</div>
</li>
<li>
@@ -2197,19 +2534,19 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The id of the parent to move to.
-</p>
+ <div class='inline'>
+<p>The id of the parent to move to.</p>
</div>
</li>
</ul>
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
@@ -2236,18 +2573,16 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Upload a new copy of the given file.
-</p>
-<p>
-TODO: Verfiy this does what I think it does
-</p>
+
+<p>Upload a new copy of the given file.</p>
+<p>TODO: Verfiy this does what I think it does</p>
+
</div>
</div>
<div class="tags">
<h3>Parameters:</h3>
<ul class="param">
@@ -2260,13 +2595,12 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-(see #upload)
-</p>
+ <div class='inline'>
+<p>(see #upload)</p>
</div>
</li>
<li>
@@ -2277,13 +2611,12 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The id of the file to copy.
-</p>
+ <div class='inline'>
+<p>The id of the file to copy.</p>
</div>
</li>
<li>
@@ -2296,31 +2629,31 @@
<em class="default">(defaults to: <tt>nil</tt>)</em>
—
- <div class='inline'><p>
-Use a new name as well.
-</p>
+ <div class='inline'>
+<p>Use a new name as well.</p>
</div>
</li>
</ul>
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
-296
-297
-298</pre>
+298
+299
+300</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/box/api.rb', line 296</span>
+ <pre class="code"><span class="info file"># File 'lib/box/api.rb', line 298</span>
<span class='kw'>def</span> <span class='id new_copy'>new_copy</span><span class='lparen'>(</span><span class='id path'>path</span><span class='comma'>,</span> <span class='id file_id'>file_id</span><span class='comma'>,</span> <span class='id name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
<span class='id query_upload'>query_upload</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>new_copy</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id file_id'>file_id</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>upload_ok</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:file</span> <span class='op'>=></span> <span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='id path'>path</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='symbol'>:new_file_name</span> <span class='op'>=></span> <span class='id name'>name</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
@@ -2335,13 +2668,12 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Overwrite the given file with a new one.
-</p>
+
+<p>Overwrite the given file with a new one.</p>
</div>
</div>
<div class="tags">
@@ -2351,18 +2683,17 @@
<li>
<span class='name'>path</span>
- <span class='type'>(<tt>String</tt>)</span>
+ <span class='type'>(<tt>String</tt>, <tt><span class='object_link'><a href="File.html" title="Box::File (class)">File</a></span> or UploadIO</tt>)</span>
—
- <div class='inline'><p>
-(see #upload)
-</p>
+ <div class='inline'>
+<p>(see #upload)</p>
</div>
</li>
<li>
@@ -2373,13 +2704,12 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-Replace the file with this id.
-</p>
+ <div class='inline'>
+<p>Replace the file with this id.</p>
</div>
</li>
<li>
@@ -2392,34 +2722,36 @@
<em class="default">(defaults to: <tt>nil</tt>)</em>
—
- <div class='inline'><p>
-Use a new name as well.
-</p>
+ <div class='inline'>
+<p>Use a new name as well.</p>
</div>
</li>
</ul>
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
-286
287
-288</pre>
+288
+289
+290</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/box/api.rb', line 286</span>
+ <pre class="code"><span class="info file"># File 'lib/box/api.rb', line 287</span>
<span class='kw'>def</span> <span class='id overwrite'>overwrite</span><span class='lparen'>(</span><span class='id path'>path</span><span class='comma'>,</span> <span class='id file_id'>file_id</span><span class='comma'>,</span> <span class='id name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
- <span class='id query_upload'>query_upload</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>overwrite</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id file_id'>file_id</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>upload_ok</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:file</span> <span class='op'>=></span> <span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='id path'>path</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='symbol'>:file_name</span> <span class='op'>=></span> <span class='id name'>name</span><span class='rparen'>)</span>
+ <span class='id path'>path</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='id path'>path</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id path'>path</span><span class='period'>.</span><span class='id is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>UploadIO</span><span class='rparen'>)</span> <span class='kw'>or</span> <span class='id path'>path</span><span class='period'>.</span><span class='id is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>File</span><span class='rparen'>)</span>
+ <span class='id query_upload'>query_upload</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>overwrite</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id file_id'>file_id</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>upload_ok</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:file</span> <span class='op'>=></span> <span class='id path'>path</span><span class='comma'>,</span> <span class='symbol'>:file_name</span> <span class='op'>=></span> <span class='id name'>name</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
@@ -2431,13 +2763,12 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Make a download request.
-</p>
+
+<p>Make a download request.</p>
</div>
</div>
<div class="tags">
@@ -2452,13 +2783,12 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-the operation to be performed (“download”).
-</p>
+ <div class='inline'>
+<p>the operation to be performed ("download").</p>
</div>
</li>
<li>
@@ -2469,13 +2799,12 @@
<span class='type'>(<tt>Array</tt>)</span>
—
- <div class='inline'><p>
-an array of arguments to put in the url.
-</p>
+ <div class='inline'>
+<p>an array of arguments to put in the url.</p>
</div>
</li>
<li>
@@ -2488,18 +2817,18 @@
<em class="default">(defaults to: <tt>{}</tt>)</em>
—
- <div class='inline'><p>
-(see #query_rest)
-</p>
+ <div class='inline'>
+<p>(see #query_rest)</p>
</div>
</li>
</ul>
+
<h3>Returns:</h3>
<ul class="return">
<li>
@@ -2507,13 +2836,12 @@
<span class='type'></span>
- <div class='inline'><p>
-The raw binary data of the file.
-</p>
+ <div class='inline'>
+<p>The raw binary data of the file.</p>
</div>
</li>
</ul>
@@ -2550,20 +2878,18 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Make a raw request.
-</p>
-<p>
-@note: HTTParty will automatically parse the response from its native
-</p>
-<pre class="code">
- XML to a nested hash/array structure.</pre>
+
+<p>Make a raw request.</p>
+<p>@note: HTTParty will automatically parse the response from its native</p>
+<pre class="code">XML to a nested hash/array structure.</pre>
+
+
</div>
</div>
<div class="tags">
<h3>Parameters:</h3>
<ul class="param">
@@ -2576,13 +2902,12 @@
<span class='type'>(<tt>'get'</tt>, <tt>'post'</tt>)</span>
—
- <div class='inline'><p>
-The HTTP method to use.
-</p>
+ <div class='inline'>
+<p>The HTTP method to use.</p>
</div>
</li>
<li>
@@ -2593,13 +2918,12 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The url to make the request.
-</p>
+ <div class='inline'>
+<p>The url to make the request.</p>
</div>
</li>
<li>
@@ -2610,13 +2934,12 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-(see #query_rest)
-</p>
+ <div class='inline'>
+<p>(see #query_rest)</p>
</div>
</li>
<li>
@@ -2629,18 +2952,18 @@
<em class="default">(defaults to: <tt>{}</tt>)</em>
—
- <div class='inline'><p>
-(see #query_rest)
-</p>
+ <div class='inline'>
+<p>(see #query_rest)</p>
</div>
</li>
</ul>
+
<h3>Returns:</h3>
<ul class="return">
<li>
@@ -2648,13 +2971,12 @@
<span class='type'>(<tt>Hash</tt>)</span>
—
- <div class='inline'><p>
-A parsed version of the XML response.
-</p>
+ <div class='inline'>
+<p>A parsed version of the XML response.</p>
</div>
</li>
</ul>
@@ -2701,13 +3023,12 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Make a normal REST request.
-</p>
+
+<p>Make a normal REST request.</p>
</div>
</div>
<div class="tags">
@@ -2722,14 +3043,13 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-the normal status expected to be returned. If the actual status does not
-match, an exception is thrown.
-</p>
+ <div class='inline'>
+<p>the normal status expected to be returned. If the actual status does not
+match, an exception is thrown.</p>
</div>
</li>
<li>
@@ -2742,20 +3062,20 @@
<em class="default">(defaults to: <tt>{}</tt>)</em>
—
- <div class='inline'><p>
-The parameters that wish to be passed in the request. These should
+ <div class='inline'>
+<p>The parameters that wish to be passed in the request. These should
coorespond to the api specifications, and will be passed along with the api
-key and auth token.
-</p>
+key and auth token.</p>
</div>
</li>
</ul>
+
<h3>Returns:</h3>
<ul class="return">
<li>
@@ -2763,13 +3083,12 @@
<span class='type'>(<tt>Hash</tt>)</span>
—
- <div class='inline'><p>
-A parsed version of the XML response.
-</p>
+ <div class='inline'>
+<p>A parsed version of the XML response.</p>
</div>
</li>
</ul>
@@ -2802,13 +3121,12 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Make an upload request.
-</p>
+
+<p>Make an upload request.</p>
</div>
</div>
<div class="tags">
@@ -2823,13 +3141,12 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The operation to be performed.
-</p>
+ <div class='inline'>
+<p>The operation to be performed.</p>
</div>
</li>
<li>
@@ -2840,13 +3157,12 @@
<span class='type'>(<tt>Array</tt>)</span>
—
- <div class='inline'><p>
-(see #query_download)
-</p>
+ <div class='inline'>
+<p>(see #query_download)</p>
</div>
</li>
<li>
@@ -2857,13 +3173,12 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-(see #query_rest)
-</p>
+ <div class='inline'>
+<p>(see #query_rest)</p>
</div>
</li>
<li>
@@ -2876,18 +3191,18 @@
<em class="default">(defaults to: <tt>{}</tt>)</em>
—
- <div class='inline'><p>
-(see #query_rest)
-</p>
+ <div class='inline'>
+<p>(see #query_rest)</p>
</div>
</li>
</ul>
+
<h3>Returns:</h3>
<ul class="return">
<li>
@@ -2895,13 +3210,12 @@
<span class='type'>(<tt>Hash</tt>)</span>
—
- <div class='inline'><p>
-A parsed version of the XML response.
-</p>
+ <div class='inline'>
+<p>A parsed version of the XML response.</p>
</div>
</li>
</ul>
@@ -2938,13 +3252,12 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Register a new user.
-</p>
+
+<p>Register a new user.</p>
</div>
</div>
<div class="tags">
@@ -2959,13 +3272,12 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The email address to use.
-</p>
+ <div class='inline'>
+<p>The email address to use.</p>
</div>
</li>
<li>
@@ -2976,19 +3288,19 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The password to use.
-</p>
+ <div class='inline'>
+<p>The password to use.</p>
</div>
</li>
</ul>
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
@@ -3015,13 +3327,12 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Rename the item.
-</p>
+
+<p>Rename the item.</p>
</div>
</div>
<div class="tags">
@@ -3036,13 +3347,12 @@
<span class='type'>(<tt>"file"</tt>, <tt>"folder"</tt>)</span>
—
- <div class='inline'><p>
-The type of item.
-</p>
+ <div class='inline'>
+<p>The type of item.</p>
</div>
</li>
<li>
@@ -3053,13 +3363,12 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The id of the item to rename.
-</p>
+ <div class='inline'>
+<p>The id of the item to rename.</p>
</div>
</li>
<li>
@@ -3070,19 +3379,19 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The new name to be used.
-</p>
+ <div class='inline'>
+<p>The new name to be used.</p>
</div>
</li>
</ul>
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
@@ -3109,13 +3418,12 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Add the auth token to every request.
-</p>
+
+<p>Add the auth token to every request.</p>
</div>
</div>
<div class="tags">
@@ -3130,19 +3438,19 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The auth token to add to every request.
-</p>
+ <div class='inline'>
+<p>The auth token to add to every request.</p>
</div>
</li>
</ul>
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
@@ -3171,13 +3479,12 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Set the item description.
-</p>
+
+<p>Set the item description.</p>
</div>
</div>
<div class="tags">
@@ -3192,13 +3499,12 @@
<span class='type'>(<tt>"file"</tt>, <tt>"folder"</tt>)</span>
—
- <div class='inline'><p>
-The type of item.
-</p>
+ <div class='inline'>
+<p>The type of item.</p>
</div>
</li>
<li>
@@ -3209,13 +3515,12 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The id of the item to describe.
-</p>
+ <div class='inline'>
+<p>The id of the item to describe.</p>
</div>
</li>
<li>
@@ -3226,19 +3531,19 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The description to use.
-</p>
+ <div class='inline'>
+<p>The description to use.</p>
</div>
</li>
</ul>
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
@@ -3265,13 +3570,12 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Upload the file to the specified folder.
-</p>
+
+<p>Upload the file to the specified folder.</p>
</div>
</div>
<div class="tags">
@@ -3281,18 +3585,17 @@
<li>
<span class='name'>path</span>
- <span class='type'>(<tt>String</tt>)</span>
+ <span class='type'>(<tt>String</tt>, <tt><span class='object_link'><a href="File.html" title="Box::File (class)">File</a></span> or UploadIO</tt>)</span>
—
- <div class='inline'><p>
-Upload the file at the given path.
-</p>
+ <div class='inline'>
+<p>Upload the file at the given path, or a File or UploadIO object..</p>
</div>
</li>
<li>
@@ -3303,13 +3606,12 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The folder id of the parent folder to use.
-</p>
+ <div class='inline'>
+<p>The folder id of the parent folder to use.</p>
</div>
</li>
<li>
@@ -3322,34 +3624,36 @@
<em class="default">(defaults to: <tt>false</tt>)</em>
—
- <div class='inline'><p>
-Upload a new copy instead of overwriting.
-</p>
+ <div class='inline'>
+<p>Upload a new copy instead of overwriting.</p>
</div>
</li>
</ul>
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
277
278
-279</pre>
+279
+280</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/box/api.rb', line 277</span>
<span class='kw'>def</span> <span class='id upload'>upload</span><span class='lparen'>(</span><span class='id path'>path</span><span class='comma'>,</span> <span class='id folder_id'>folder_id</span><span class='comma'>,</span> <span class='id new_copy'>new_copy</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
- <span class='id query_upload'>query_upload</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>upload</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id folder_id'>folder_id</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>upload_ok</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:file</span> <span class='op'>=></span> <span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='id path'>path</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='symbol'>:new_copy</span> <span class='op'>=></span> <span class='id new_copy'>new_copy</span><span class='rparen'>)</span>
+ <span class='id path'>path</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='id path'>path</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id path'>path</span><span class='period'>.</span><span class='id is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>UploadIO</span><span class='rparen'>)</span> <span class='kw'>or</span> <span class='id path'>path</span><span class='period'>.</span><span class='id is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>File</span><span class='rparen'>)</span>
+ <span class='id query_upload'>query_upload</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>upload</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id folder_id'>folder_id</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>upload_ok</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:file</span> <span class='op'>=></span> <span class='id path'>path</span><span class='comma'>,</span> <span class='symbol'>:new_copy</span> <span class='op'>=></span> <span class='id new_copy'>new_copy</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
@@ -3361,13 +3665,12 @@
</p><div class="docstring">
<div class="discussion">
- <p>
-Verify a registration email.
-</p>
+
+<p>Verify a registration email.</p>
</div>
</div>
<div class="tags">
@@ -3382,19 +3685,19 @@
<span class='type'>(<tt>String</tt>)</span>
—
- <div class='inline'><p>
-The email address to check.
-</p>
+ <div class='inline'>
+<p>The email address to check.</p>
</div>
</li>
</ul>
+
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
@@ -3417,12 +3720,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