box-api 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- box-api (0.2.0)
4
+ box-api (0.2.1)
5
5
  httmultiparty (~> 0.3.6)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -22,6 +22,8 @@ Once you have an API key, you are free to start using the box API! Check out the
22
22
 
23
23
  ### Documentation ###
24
24
 
25
+ You can find documentation for this gem [here](http://rubydoc.info/gems/box-api/frames).
26
+
25
27
  You can find API documentation at [http://developers.box.net/](http://developers.box.net/). Full documentation regarding the Ruby library methods is coming soon.
26
28
 
27
29
  ### Support ###
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "box-api"
3
- s.version = "0.2.0"
3
+ s.version = "0.2.1"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.authors = ["Box.net", "Luke Curley"]
6
6
  s.email = ["luke@box.net"]
@@ -99,7 +99,7 @@
99
99
  </div>
100
100
 
101
101
  <div id="footer">
102
- Generated on Tue Nov 8 15:32:23 2011 by
102
+ Generated on Wed Nov 9 12:40:36 2011 by
103
103
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
104
104
  0.7.3 (ruby-1.9.3).
105
105
  </div>
@@ -194,6 +194,52 @@ permission from the user to let this application use their account.</p>
194
194
  <p>Is the account authorized?.</p>
195
195
  </div></span>
196
196
 
197
+ </li>
198
+
199
+
200
+ <li class="public ">
201
+ <span class="summary_signature">
202
+
203
+ <a href="#file-instance_method" title="#file (instance method)">- (Object) <strong>file</strong>(id) </a>
204
+
205
+
206
+
207
+ </span>
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+ <span class="summary_desc"><div class='inline'>
217
+ <p>Gets a file object by id.</p>
218
+ </div></span>
219
+
220
+ </li>
221
+
222
+
223
+ <li class="public ">
224
+ <span class="summary_signature">
225
+
226
+ <a href="#folder-instance_method" title="#folder (instance method)">- (Object) <strong>folder</strong>(id) </a>
227
+
228
+
229
+
230
+ </span>
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+ <span class="summary_desc"><div class='inline'>
240
+ <p>Gets a folder object by id.</p>
241
+ </div></span>
242
+
197
243
  </li>
198
244
 
199
245
 
@@ -493,19 +539,19 @@ permission from the user to let this application use their account.</p>
493
539
  <pre class="lines">
494
540
 
495
541
 
496
- 184
497
- 185
498
- 186
499
- 187
500
- 188
501
- 189
502
- 190
503
- 191
504
- 192
505
- 193</pre>
542
+ 216
543
+ 217
544
+ 218
545
+ 219
546
+ 220
547
+ 221
548
+ 222
549
+ 223
550
+ 224
551
+ 225</pre>
506
552
  </td>
507
553
  <td>
508
- <pre class="code"><span class="info file"># File 'lib/box/account.rb', line 184</span>
554
+ <pre class="code"><span class="info file"># File 'lib/box/account.rb', line 216</span>
509
555
 
510
556
  <span class='kw'>def</span> <span class='id method_missing'>method_missing</span><span class='lparen'>(</span><span class='id sym'>sym</span><span class='comma'>,</span> <span class='op'>*</span><span class='id args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id block'>block</span><span class='rparen'>)</span>
511
557
  <span class='kw'>super</span> <span class='kw'>unless</span> <span class='id authorized?'>authorized?</span>
@@ -829,12 +875,12 @@ passed url and authorize this app before continuing.</p>
829
875
  <pre class="lines">
830
876
 
831
877
 
832
- 170
833
- 171
834
- 172</pre>
878
+ 202
879
+ 203
880
+ 204</pre>
835
881
  </td>
836
882
  <td>
837
- <pre class="code"><span class="info file"># File 'lib/box/account.rb', line 170</span>
883
+ <pre class="code"><span class="info file"># File 'lib/box/account.rb', line 202</span>
838
884
 
839
885
  <span class='kw'>def</span> <span class='id authorized?'>authorized?</span>
840
886
  <span class='ivar'>@info</span> <span class='op'>!=</span> <span class='kw'>nil</span>
@@ -842,6 +888,160 @@ passed url and authorize this app before continuing.</p>
842
888
  </td>
843
889
  </tr>
844
890
  </table>
891
+ </div>
892
+
893
+ <div class="method_details ">
894
+ <p class="signature " id="file-instance_method">
895
+
896
+ - (<tt>Object</tt>) <strong>file</strong>(id)
897
+
898
+
899
+
900
+ </p><div class="docstring">
901
+ <div class="discussion">
902
+
903
+ <div class="note notetag">
904
+ <strong>Note:</strong>
905
+ <div class='inline'>
906
+ <p>This file will not know its parent because of API short-comings. If you
907
+ need the tree above this file, use root.find(:type =&gt; 'file', :id =&gt;
908
+ id).first instead.</p>
909
+ </div>
910
+ </div>
911
+
912
+ <div class="note notetag">
913
+ <strong>Note:</strong>
914
+ <div class='inline'>
915
+ <p>This function will return a file regardless of whether it actually exists.
916
+ You will get exceptions if you try to access any info.</p>
917
+ </div>
918
+ </div>
919
+
920
+
921
+ <p>Gets a file object by id.</p>
922
+
923
+
924
+ </div>
925
+ </div>
926
+ <div class="tags">
927
+ <h3>Parameters:</h3>
928
+ <ul class="param">
929
+
930
+ <li>
931
+
932
+ <span class='name'>id</span>
933
+
934
+
935
+ <span class='type'>(<tt>String</tt>)</span>
936
+
937
+
938
+
939
+ &mdash;
940
+ <div class='inline'>
941
+ <p>The id of the folder to fetch.</p>
942
+ </div>
943
+
944
+ </li>
945
+
946
+ </ul>
947
+
948
+
949
+ </div><table class="source_code">
950
+ <tr>
951
+ <td>
952
+ <pre class="lines">
953
+
954
+
955
+ 197
956
+ 198
957
+ 199</pre>
958
+ </td>
959
+ <td>
960
+ <pre class="code"><span class="info file"># File 'lib/box/account.rb', line 197</span>
961
+
962
+ <span class='kw'>def</span> <span class='id file'>file</span><span class='lparen'>(</span><span class='id id'>id</span><span class='rparen'>)</span>
963
+ <span class='const'>Box</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='ivar'>@api</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='symbol'>:id</span> <span class='op'>=&gt;</span> <span class='id id'>id</span><span class='rparen'>)</span>
964
+ <span class='kw'>end</span></pre>
965
+ </td>
966
+ </tr>
967
+ </table>
968
+ </div>
969
+
970
+ <div class="method_details ">
971
+ <p class="signature " id="folder-instance_method">
972
+
973
+ - (<tt>Object</tt>) <strong>folder</strong>(id)
974
+
975
+
976
+
977
+ </p><div class="docstring">
978
+ <div class="discussion">
979
+
980
+ <div class="note notetag">
981
+ <strong>Note:</strong>
982
+ <div class='inline'>
983
+ <p>This folder will not know its parent because of API short-comings. If you
984
+ need the tree above this folder, use root.find(:type =&gt; 'folder', :id
985
+ =&gt; id).first instead.</p>
986
+ </div>
987
+ </div>
988
+
989
+ <div class="note notetag">
990
+ <strong>Note:</strong>
991
+ <div class='inline'>
992
+ <p>This function will return a folder regardless of whether it actually
993
+ exists. You will get exceptions if you try to access any info.</p>
994
+ </div>
995
+ </div>
996
+
997
+
998
+ <p>Gets a folder object by id.</p>
999
+
1000
+
1001
+ </div>
1002
+ </div>
1003
+ <div class="tags">
1004
+ <h3>Parameters:</h3>
1005
+ <ul class="param">
1006
+
1007
+ <li>
1008
+
1009
+ <span class='name'>id</span>
1010
+
1011
+
1012
+ <span class='type'>(<tt>String</tt>)</span>
1013
+
1014
+
1015
+
1016
+ &mdash;
1017
+ <div class='inline'>
1018
+ <p>The id of the folder to fetch.</p>
1019
+ </div>
1020
+
1021
+ </li>
1022
+
1023
+ </ul>
1024
+
1025
+
1026
+ </div><table class="source_code">
1027
+ <tr>
1028
+ <td>
1029
+ <pre class="lines">
1030
+
1031
+
1032
+ 181
1033
+ 182
1034
+ 183</pre>
1035
+ </td>
1036
+ <td>
1037
+ <pre class="code"><span class="info file"># File 'lib/box/account.rb', line 181</span>
1038
+
1039
+ <span class='kw'>def</span> <span class='id folder'>folder</span><span class='lparen'>(</span><span class='id id'>id</span><span class='rparen'>)</span>
1040
+ <span class='const'>Box</span><span class='op'>::</span><span class='const'>Folder</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='ivar'>@api</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='symbol'>:id</span> <span class='op'>=&gt;</span> <span class='id id'>id</span><span class='rparen'>)</span>
1041
+ <span class='kw'>end</span></pre>
1042
+ </td>
1043
+ </tr>
1044
+ </table>
845
1045
  </div>
846
1046
 
847
1047
  <div class="method_details ">
@@ -1194,12 +1394,12 @@ and the auth token will no longer work.</p>
1194
1394
  <pre class="lines">
1195
1395
 
1196
1396
 
1197
- 195
1198
- 196
1199
- 197</pre>
1397
+ 227
1398
+ 228
1399
+ 229</pre>
1200
1400
  </td>
1201
1401
  <td>
1202
- <pre class="code"><span class="info file"># File 'lib/box/account.rb', line 195</span>
1402
+ <pre class="code"><span class="info file"># File 'lib/box/account.rb', line 227</span>
1203
1403
 
1204
1404
  <span class='kw'>def</span> <span class='id respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='id sym'>sym</span><span class='rparen'>)</span>
1205
1405
  <span class='ivar'>@info</span><span class='period'>.</span><span class='id key?'>key?</span><span class='lparen'>(</span><span class='id sym'>sym</span><span class='period'>.</span><span class='id to_s'>to_s</span><span class='rparen'>)</span> <span class='kw'>or</span> <span class='kw'>super</span>
@@ -1263,7 +1463,7 @@ network request will be made if/when the data is requested.</p>
1263
1463
 
1264
1464
  <span class='kw'>def</span> <span class='id root'>root</span>
1265
1465
  <span class='kw'>return</span> <span class='ivar'>@root</span> <span class='kw'>if</span> <span class='ivar'>@root</span>
1266
- <span class='ivar'>@root</span> <span class='op'>=</span> <span class='const'>Box</span><span class='op'>::</span><span class='const'>Folder</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='ivar'>@api</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='symbol'>:id</span> <span class='op'>=&gt;</span> <span class='int'>0</span><span class='rparen'>)</span>
1466
+ <span class='ivar'>@root</span> <span class='op'>=</span> <span class='id folder'>folder</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span>
1267
1467
  <span class='kw'>end</span></pre>
1268
1468
  </td>
1269
1469
  </tr>
@@ -1312,12 +1512,12 @@ network request will be made if/when the data is requested.</p>
1312
1512
  <pre class="lines">
1313
1513
 
1314
1514
 
1315
- 176
1316
- 177
1317
- 178</pre>
1515
+ 208
1516
+ 209
1517
+ 210</pre>
1318
1518
  </td>
1319
1519
  <td>
1320
- <pre class="code"><span class="info file"># File 'lib/box/account.rb', line 176</span>
1520
+ <pre class="code"><span class="info file"># File 'lib/box/account.rb', line 208</span>
1321
1521
 
1322
1522
  <span class='kw'>def</span> <span class='id ticket'>ticket</span>
1323
1523
  <span class='ivar'>@ticket</span> <span class='op'>||=</span> <span class='ivar'>@api</span><span class='period'>.</span><span class='id get_ticket'>get_ticket</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ticket</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
@@ -1332,7 +1532,7 @@ network request will be made if/when the data is requested.</p>
1332
1532
  </div>
1333
1533
 
1334
1534
  <div id="footer">
1335
- Generated on Tue Nov 8 15:32:23 2011 by
1535
+ Generated on Wed Nov 9 12:40:37 2011 by
1336
1536
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1337
1537
  0.7.3 (ruby-1.9.3).
1338
1538
  </div>
@@ -117,7 +117,7 @@ perform. TODO: Link to the site.</p>
117
117
 
118
118
 
119
119
 
120
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="Api/AccountExceeded.html" title="Box::Api::AccountExceeded (class)">AccountExceeded</a></span>, <span class='object_link'><a href="Api/EmailInvalid.html" title="Box::Api::EmailInvalid (class)">EmailInvalid</a></span>, <span class='object_link'><a href="Api/EmailTaken.html" title="Box::Api::EmailTaken (class)">EmailTaken</a></span>, <span class='object_link'><a href="Api/ErrorStatus.html" title="Box::Api::ErrorStatus (class)">ErrorStatus</a></span>, <span class='object_link'><a href="Api/Exception.html" title="Box::Api::Exception (class)">Exception</a></span>, <span class='object_link'><a href="Api/Generic.html" title="Box::Api::Generic (class)">Generic</a></span>, <span class='object_link'><a href="Api/InvalidFolder.html" title="Box::Api::InvalidFolder (class)">InvalidFolder</a></span>, <span class='object_link'><a href="Api/InvalidInput.html" title="Box::Api::InvalidInput (class)">InvalidInput</a></span>, <span class='object_link'><a href="Api/InvalidName.html" title="Box::Api::InvalidName (class)">InvalidName</a></span>, <span class='object_link'><a href="Api/NameTaken.html" title="Box::Api::NameTaken (class)">NameTaken</a></span>, <span class='object_link'><a href="Api/NoAccess.html" title="Box::Api::NoAccess (class)">NoAccess</a></span>, <span class='object_link'><a href="Api/NoParent.html" title="Box::Api::NoParent (class)">NoParent</a></span>, <span class='object_link'><a href="Api/NotAuthorized.html" title="Box::Api::NotAuthorized (class)">NotAuthorized</a></span>, <span class='object_link'><a href="Api/Restricted.html" title="Box::Api::Restricted (class)">Restricted</a></span>, <span class='object_link'><a href="Api/SizeExceeded.html" title="Box::Api::SizeExceeded (class)">SizeExceeded</a></span>, <span class='object_link'><a href="Api/Unknown.html" title="Box::Api::Unknown (class)">Unknown</a></span>, <span class='object_link'><a href="Api/UnknownResponse.html" title="Box::Api::UnknownResponse (class)">UnknownResponse</a></span>, <span class='object_link'><a href="Api/UploadFailed.html" title="Box::Api::UploadFailed (class)">UploadFailed</a></span>
120
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Api/AccountExceeded.html" title="Box::Api::AccountExceeded (class)">AccountExceeded</a></span>, <span class='object_link'><a href="Api/EmailInvalid.html" title="Box::Api::EmailInvalid (class)">EmailInvalid</a></span>, <span class='object_link'><a href="Api/EmailTaken.html" title="Box::Api::EmailTaken (class)">EmailTaken</a></span>, <span class='object_link'><a href="Api/ErrorStatus.html" title="Box::Api::ErrorStatus (class)">ErrorStatus</a></span>, <span class='object_link'><a href="Api/Exception.html" title="Box::Api::Exception (class)">Exception</a></span>, <span class='object_link'><a href="Api/Generic.html" title="Box::Api::Generic (class)">Generic</a></span>, <span class='object_link'><a href="Api/InvalidFolder.html" title="Box::Api::InvalidFolder (class)">InvalidFolder</a></span>, <span class='object_link'><a href="Api/InvalidInput.html" title="Box::Api::InvalidInput (class)">InvalidInput</a></span>, <span class='object_link'><a href="Api/InvalidName.html" title="Box::Api::InvalidName (class)">InvalidName</a></span>, <span class='object_link'><a href="Api/NameTaken.html" title="Box::Api::NameTaken (class)">NameTaken</a></span>, <span class='object_link'><a href="Api/NoAccess.html" title="Box::Api::NoAccess (class)">NoAccess</a></span>, <span class='object_link'><a href="Api/NoParent.html" title="Box::Api::NoParent (class)">NoParent</a></span>, <span class='object_link'><a href="Api/NotAuthorized.html" title="Box::Api::NotAuthorized (class)">NotAuthorized</a></span>, <span class='object_link'><a href="Api/NotShared.html" title="Box::Api::NotShared (class)">NotShared</a></span>, <span class='object_link'><a href="Api/Restricted.html" title="Box::Api::Restricted (class)">Restricted</a></span>, <span class='object_link'><a href="Api/SizeExceeded.html" title="Box::Api::SizeExceeded (class)">SizeExceeded</a></span>, <span class='object_link'><a href="Api/Unknown.html" title="Box::Api::Unknown (class)">Unknown</a></span>, <span class='object_link'><a href="Api/UnknownResponse.html" title="Box::Api::UnknownResponse (class)">UnknownResponse</a></span>, <span class='object_link'><a href="Api/UploadFailed.html" title="Box::Api::UploadFailed (class)">UploadFailed</a></span>
121
121
 
122
122
 
123
123
  </p>
@@ -845,6 +845,75 @@ perform. TODO: Link to the site.</p>
845
845
  <p>Set the item description.</p>
846
846
  </div></span>
847
847
 
848
+ </li>
849
+
850
+
851
+ <li class="public ">
852
+ <span class="summary_signature">
853
+
854
+ <a href="#share_private-instance_method" title="#share_private (instance method)">- (Object) <strong>share_private</strong>(target, target_id, emails, options = Hash.new) </a>
855
+
856
+
857
+
858
+ </span>
859
+
860
+
861
+
862
+
863
+
864
+
865
+
866
+
867
+ <span class="summary_desc"><div class='inline'>
868
+ <p>Share an item privately, making it accessible only via email.</p>
869
+ </div></span>
870
+
871
+ </li>
872
+
873
+
874
+ <li class="public ">
875
+ <span class="summary_signature">
876
+
877
+ <a href="#share_public-instance_method" title="#share_public (instance method)">- (Object) <strong>share_public</strong>(target, target_id, options = Hash.new) </a>
878
+
879
+
880
+
881
+ </span>
882
+
883
+
884
+
885
+
886
+
887
+
888
+
889
+
890
+ <span class="summary_desc"><div class='inline'>
891
+ <p>Share an item publically, making it accessible via a share link.</p>
892
+ </div></span>
893
+
894
+ </li>
895
+
896
+
897
+ <li class="public ">
898
+ <span class="summary_signature">
899
+
900
+ <a href="#unshare_public-instance_method" title="#unshare_public (instance method)">- (Object) <strong>unshare_public</strong>(target, target_id) </a>
901
+
902
+
903
+
904
+ </span>
905
+
906
+
907
+
908
+
909
+
910
+
911
+
912
+
913
+ <span class="summary_desc"><div class='inline'>
914
+ <p>Stop sharing an item publically.</p>
915
+ </div></span>
916
+
848
917
  </li>
849
918
 
850
919
 
@@ -1226,9 +1295,6 @@ is passed instead, its key is used.</p>
1226
1295
  <pre class="lines">
1227
1296
 
1228
1297
 
1229
- 36
1230
- 37
1231
- 38
1232
1298
  39
1233
1299
  40
1234
1300
  41
@@ -1270,10 +1336,22 @@ is passed instead, its key is used.</p>
1270
1336
  77
1271
1337
  78
1272
1338
  79
1273
- 80</pre>
1339
+ 80
1340
+ 81
1341
+ 82
1342
+ 83
1343
+ 84
1344
+ 85
1345
+ 86
1346
+ 87
1347
+ 88
1348
+ 89
1349
+ 90
1350
+ 91
1351
+ 92</pre>
1274
1352
  </td>
1275
1353
  <td>
1276
- <pre class="code"><span class="info file"># File 'lib/box/api/exceptions.rb', line 36</span>
1354
+ <pre class="code"><span class="info file"># File 'lib/box/api/exceptions.rb', line 39</span>
1277
1355
 
1278
1356
  <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>
1279
1357
  <span class='kw'>case</span> <span class='id status'>status</span>
@@ -1294,7 +1372,9 @@ is passed instead, its key is used.</p>
1294
1372
  <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>get_auth_token_error</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>e_register</span><span class='tstring_end'>&quot;</span></span>
1295
1373
  <span class='const'>Generic</span>
1296
1374
  <span class='comment'># Folder/File specific responses
1297
- </span> <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>e_folder_id</span><span class='tstring_end'>&quot;</span></span>
1375
+ </span> <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>wrong_node</span><span class='tstring_end'>&quot;</span></span>
1376
+ <span class='const'>InvalidItem</span>
1377
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>e_folder_id</span><span class='tstring_end'>&quot;</span></span>
1298
1378
  <span class='const'>InvalidFolder</span>
1299
1379
  <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>no_parent</span><span class='tstring_end'>&quot;</span></span>
1300
1380
  <span class='const'>NoParent</span>
@@ -1316,6 +1396,13 @@ is passed instead, its key is used.</p>
1316
1396
  <span class='comment'># Comment specific responses
1317
1397
  </span> <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>get_comments_error</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>add_comment_error</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>delete_comment_error</span><span class='tstring_end'>&quot;</span></span>
1318
1398
  <span class='const'>Generic</span>
1399
+ <span class='comment'># Sharing specific responses
1400
+ </span> <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>file_not_shared</span><span class='tstring_end'>&quot;</span></span>
1401
+ <span class='const'>NotShared</span>
1402
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>wrong input params</span><span class='tstring_end'>&quot;</span></span>
1403
+ <span class='const'>InvalidInput</span>
1404
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>share_error</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>unshare_error</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>private_share_error</span><span class='tstring_end'>&quot;</span></span>
1405
+ <span class='const'>Generic</span>
1319
1406
  <span class='kw'>else</span>
1320
1407
  <span class='const'>Unknown</span>
1321
1408
  <span class='kw'>end</span>
@@ -3561,6 +3648,285 @@ key and auth token.</p>
3561
3648
  </td>
3562
3649
  </tr>
3563
3650
  </table>
3651
+ </div>
3652
+
3653
+ <div class="method_details ">
3654
+ <p class="signature " id="share_private-instance_method">
3655
+
3656
+ - (<tt>Object</tt>) <strong>share_private</strong>(target, target_id, emails, options = Hash.new)
3657
+
3658
+
3659
+
3660
+ </p><div class="docstring">
3661
+ <div class="discussion">
3662
+
3663
+ <p>Share an item privately, making it accessible only via email.</p>
3664
+
3665
+
3666
+ </div>
3667
+ </div>
3668
+ <div class="tags">
3669
+ <h3>Parameters:</h3>
3670
+ <ul class="param">
3671
+
3672
+ <li>
3673
+
3674
+ <span class='name'>target</span>
3675
+
3676
+
3677
+ <span class='type'>(<tt>String</tt>)</span>
3678
+
3679
+
3680
+
3681
+ &mdash;
3682
+ <div class='inline'>
3683
+ <p>The type of item.</p>
3684
+ </div>
3685
+
3686
+ </li>
3687
+
3688
+ <li>
3689
+
3690
+ <span class='name'>target_id</span>
3691
+
3692
+
3693
+ <span class='type'>(<tt>String</tt>)</span>
3694
+
3695
+
3696
+
3697
+ &mdash;
3698
+ <div class='inline'>
3699
+ <p>The id of the item to share.</p>
3700
+ </div>
3701
+
3702
+ </li>
3703
+
3704
+ <li>
3705
+
3706
+ <span class='name'>emails</span>
3707
+
3708
+
3709
+ <span class='type'>(<tt>Array</tt>)</span>
3710
+
3711
+
3712
+
3713
+ &mdash;
3714
+ <div class='inline'>
3715
+ <p>The email addresses of the individuals to share with.</p>
3716
+ </div>
3717
+
3718
+ </li>
3719
+
3720
+ <li>
3721
+
3722
+ <span class='name'>options</span>
3723
+
3724
+
3725
+ <span class='type'>(<tt>Hash</tt>)</span>
3726
+
3727
+
3728
+ <em class="default">(defaults to: <tt>Hash.new</tt>)</em>
3729
+
3730
+
3731
+ &mdash;
3732
+ <div class='inline'>
3733
+ <p>Extra options related to notifications. Please read the developer
3734
+ documentation for more details.</p>
3735
+ </div>
3736
+
3737
+ </li>
3738
+
3739
+ </ul>
3740
+
3741
+
3742
+ </div><table class="source_code">
3743
+ <tr>
3744
+ <td>
3745
+ <pre class="lines">
3746
+
3747
+
3748
+ 353
3749
+ 354
3750
+ 355</pre>
3751
+ </td>
3752
+ <td>
3753
+ <pre class="code"><span class="info file"># File 'lib/box/api.rb', line 353</span>
3754
+
3755
+ <span class='kw'>def</span> <span class='id share_private'>share_private</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 emails'>emails</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>
3756
+ <span class='id query_rest'>query_rest</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>private_share_ok</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='symbol'>:action</span> <span class='op'>=&gt;</span> <span class='symbol'>:private_share</span><span class='comma'>,</span> <span class='symbol'>:target</span> <span class='op'>=&gt;</span> <span class='id target'>target</span><span class='comma'>,</span> <span class='symbol'>:target_id</span> <span class='op'>=&gt;</span> <span class='id target_id'>target_id</span><span class='comma'>,</span> <span class='symbol'>:emails</span> <span class='op'>=&gt;</span> <span class='id emails'>emails</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>
3757
+ <span class='kw'>end</span></pre>
3758
+ </td>
3759
+ </tr>
3760
+ </table>
3761
+ </div>
3762
+
3763
+ <div class="method_details ">
3764
+ <p class="signature " id="share_public-instance_method">
3765
+
3766
+ - (<tt>Object</tt>) <strong>share_public</strong>(target, target_id, options = Hash.new)
3767
+
3768
+
3769
+
3770
+ </p><div class="docstring">
3771
+ <div class="discussion">
3772
+
3773
+ <p>Share an item publically, making it accessible via a share link.</p>
3774
+
3775
+
3776
+ </div>
3777
+ </div>
3778
+ <div class="tags">
3779
+ <h3>Parameters:</h3>
3780
+ <ul class="param">
3781
+
3782
+ <li>
3783
+
3784
+ <span class='name'>target</span>
3785
+
3786
+
3787
+ <span class='type'>(<tt>String</tt>)</span>
3788
+
3789
+
3790
+
3791
+ &mdash;
3792
+ <div class='inline'>
3793
+ <p>The type of item.</p>
3794
+ </div>
3795
+
3796
+ </li>
3797
+
3798
+ <li>
3799
+
3800
+ <span class='name'>target_id</span>
3801
+
3802
+
3803
+ <span class='type'>(<tt>String</tt>)</span>
3804
+
3805
+
3806
+
3807
+ &mdash;
3808
+ <div class='inline'>
3809
+ <p>The id of the item to share.</p>
3810
+ </div>
3811
+
3812
+ </li>
3813
+
3814
+ <li>
3815
+
3816
+ <span class='name'>options</span>
3817
+
3818
+
3819
+ <span class='type'>(<tt>Hash</tt>)</span>
3820
+
3821
+
3822
+ <em class="default">(defaults to: <tt>Hash.new</tt>)</em>
3823
+
3824
+
3825
+ &mdash;
3826
+ <div class='inline'>
3827
+ <p>Extra options related to notifications. Please read the developer
3828
+ documentation for more details.</p>
3829
+ </div>
3830
+
3831
+ </li>
3832
+
3833
+ </ul>
3834
+
3835
+
3836
+ </div><table class="source_code">
3837
+ <tr>
3838
+ <td>
3839
+ <pre class="lines">
3840
+
3841
+
3842
+ 341
3843
+ 342
3844
+ 343</pre>
3845
+ </td>
3846
+ <td>
3847
+ <pre class="code"><span class="info file"># File 'lib/box/api.rb', line 341</span>
3848
+
3849
+ <span class='kw'>def</span> <span class='id share_public'>share_public</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 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>
3850
+ <span class='id query_rest'>query_rest</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>share_ok</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='symbol'>:action</span> <span class='op'>=&gt;</span> <span class='symbol'>:public_share</span><span class='comma'>,</span> <span class='symbol'>:target</span> <span class='op'>=&gt;</span> <span class='id target'>target</span><span class='comma'>,</span> <span class='symbol'>:target_id</span> <span class='op'>=&gt;</span> <span class='id target_id'>target_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>
3851
+ <span class='kw'>end</span></pre>
3852
+ </td>
3853
+ </tr>
3854
+ </table>
3855
+ </div>
3856
+
3857
+ <div class="method_details ">
3858
+ <p class="signature " id="unshare_public-instance_method">
3859
+
3860
+ - (<tt>Object</tt>) <strong>unshare_public</strong>(target, target_id)
3861
+
3862
+
3863
+
3864
+ </p><div class="docstring">
3865
+ <div class="discussion">
3866
+
3867
+ <p>Stop sharing an item publically.</p>
3868
+
3869
+
3870
+ </div>
3871
+ </div>
3872
+ <div class="tags">
3873
+ <h3>Parameters:</h3>
3874
+ <ul class="param">
3875
+
3876
+ <li>
3877
+
3878
+ <span class='name'>target</span>
3879
+
3880
+
3881
+ <span class='type'>(<tt>String</tt>)</span>
3882
+
3883
+
3884
+
3885
+ &mdash;
3886
+ <div class='inline'>
3887
+ <p>The type of item.</p>
3888
+ </div>
3889
+
3890
+ </li>
3891
+
3892
+ <li>
3893
+
3894
+ <span class='name'>target_id</span>
3895
+
3896
+
3897
+ <span class='type'>(<tt>String</tt>)</span>
3898
+
3899
+
3900
+
3901
+ &mdash;
3902
+ <div class='inline'>
3903
+ <p>The id of the item to unshare.</p>
3904
+ </div>
3905
+
3906
+ </li>
3907
+
3908
+ </ul>
3909
+
3910
+
3911
+ </div><table class="source_code">
3912
+ <tr>
3913
+ <td>
3914
+ <pre class="lines">
3915
+
3916
+
3917
+ 361
3918
+ 362
3919
+ 363</pre>
3920
+ </td>
3921
+ <td>
3922
+ <pre class="code"><span class="info file"># File 'lib/box/api.rb', line 361</span>
3923
+
3924
+ <span class='kw'>def</span> <span class='id unshare_public'>unshare_public</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>
3925
+ <span class='id query_rest'>query_rest</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>unshare_ok</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:action</span> <span class='op'>=&gt;</span> <span class='symbol'>:public_unshare</span><span class='comma'>,</span> <span class='symbol'>:target</span> <span class='op'>=&gt;</span> <span class='id target'>target</span><span class='comma'>,</span> <span class='symbol'>:target_id</span> <span class='op'>=&gt;</span> <span class='id target_id'>target_id</span><span class='rparen'>)</span>
3926
+ <span class='kw'>end</span></pre>
3927
+ </td>
3928
+ </tr>
3929
+ </table>
3564
3930
  </div>
3565
3931
 
3566
3932
  <div class="method_details ">
@@ -3722,7 +4088,7 @@ key and auth token.</p>
3722
4088
  </div>
3723
4089
 
3724
4090
  <div id="footer">
3725
- Generated on Tue Nov 8 15:32:23 2011 by
4091
+ Generated on Wed Nov 9 12:40:36 2011 by
3726
4092
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
3727
4093
  0.7.3 (ruby-1.9.3).
3728
4094
  </div>