docs/file.README.html in dropbox_api-0.1.19 vs docs/file.README.html in dropbox_api-0.1.20

- old
+ new

@@ -4,19 +4,19 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> File: README - &mdash; Documentation by YARD 0.9.19 + &mdash; Documentation by YARD 0.9.26 </title> - <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" /> + <link rel="stylesheet" href="css/style.css" type="text/css" /> - <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" /> + <link rel="stylesheet" href="css/common.css" type="text/css" /> -<script type="text/javascript" charset="utf-8"> +<script type="text/javascript"> pathId = "README"; relpath = ''; </script> @@ -55,15 +55,15 @@ </div> <div class="clear"></div> </div> - <div id="content"><div id='filecontents'><h1>DropboxApi</h1> + <div id="content"><div id='filecontents'><h1 id="dropboxapi">DropboxApi</h1> <p>Library for communicating with Dropbox API v2.</p> -<h2>Installation</h2> +<h2 id="installation">Installation</h2> <p>Add this line to your application&#39;s Gemfile:</p> <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>dropbox_api</span><span class='tstring_end'>&#39;</span></span> </code></pre> @@ -76,11 +76,11 @@ <p>Or install it yourself as:</p> <pre class="code ruby"><code class="ruby">$ gem install dropbox_api </code></pre> -<h2>Documentation</h2> +<h2 id="documentation">Documentation</h2> <p>Please, refer to this gem&#39;s custom <a href="http://jesus.github.io/dropbox_api">Dropbox API documentation</a>. Most of the time you&#39;ll be checking the <a href="http://jesus.github.io/dropbox_api/DropboxApi/Client.html">available endpoints</a>.</p> @@ -94,13 +94,13 @@ an example of its usage.</li> <li>All endpoints are shown as methods of the <code>Client</code> class, just as you will use them.</li> </ul> -<h2>Basic set up</h2> +<h2 id="basic-set-up">Basic set up</h2> -<h3>Authorize your application</h3> +<h3 id="authorize-your-application">Authorize your application</h3> <p>Dropbox uses OAuth, in order to use this library from your application you&#39;ll have to get an authorization code.</p> <p>Once you have it, just pass it on client initialization:</p> @@ -117,21 +117,21 @@ </span></code></pre> <p>Note that setting an ENV variable is only a feasible choice if you&#39;re only using one account.</p> -<h4>Option A: Get your access token from the website</h4> +<h4 id="option-a-get-your-access-token-from-the-website">Option A: Get your access token from the website</h4> <p>The easiest way to obtain an access token is to get it from the Dropbox website. You just need to log in to Dropbox and refer to the <em>developers</em> section, go to <em>My apps</em> and select your application, you may need to create one if you haven&#39;t done so yet.</p> <p>Under your application settings, find section <em>OAuth 2</em>. You&#39;ll find a button to generate an access token.</p> -<h4>Option B: Use <code>DropboxApi::Authenticator</code></h4> +<h4 id="option-b-use-dropboxapi-authenticator">Option B: Use <code>DropboxApi::Authenticator</code></h4> <p>You can obtain an authorization code with this library:</p> <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_authenticator'>authenticator</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="DropboxApi.html" title="DropboxApi (module)">DropboxApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="DropboxApi/Authenticator.html" title="DropboxApi::Authenticator (class)">Authenticator</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="DropboxApi/Authenticator.html#initialize-instance_method" title="DropboxApi::Authenticator#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='const'>CLIENT_ID</span><span class='comma'>,</span> <span class='const'>CLIENT_SECRET</span><span class='rparen'>)</span> <span class='id identifier rubyid_authenticator'>authenticator</span><span class='period'>.</span><span class='id identifier rubyid_authorize_url'>authorize_url</span> <span class='comment'>#=&gt; &quot;https://www.dropbox.com/...&quot; @@ -142,19 +142,19 @@ <span class='id identifier rubyid_auth_bearer'>auth_bearer</span> <span class='op'>=</span> <span class='id identifier rubyid_authenticator'>authenticator</span><span class='period'>.</span><span class='id identifier rubyid_get_token'>get_token</span><span class='lparen'>(</span><span class='const'>CODE</span><span class='rparen'>)</span> <span class='comment'>#=&gt; #&lt;OAuth2::AccessToken ...&gt;` </span><span class='id identifier rubyid_auth_bearer'>auth_bearer</span><span class='period'>.</span><span class='id identifier rubyid_token'>token</span> <span class='comment'>#=&gt; &quot;VofXAX8D...&quot; </span><span class='comment'># Keep this token, you&#39;ll need it to initialize a `DropboxApi::Client` object </span></code></pre> -<h4>Standard OAuth 2 flow</h4> +<h4 id="standard-oauth-2-flow">Standard OAuth 2 flow</h4> <p>This is what many web applications will use. The process is described in Dropbox&#39;s <a href="https://www.dropbox.com/developers/reference/oauth-guide#oauth-2-on-the-web">OAuth guide</a>.</p> <p>If you have a Rails application, you might be interested in this <a href="http://jesus.github.io/dropbox_api/file.rails_setup.html">setup guide</a>.</p> -<h3>Performing API calls</h3> +<h3 id="performing-api-calls">Performing API calls</h3> <p>Once you&#39;ve initialized a client, for example:</p> <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_client'>client</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="DropboxApi.html" title="DropboxApi (module)">DropboxApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="DropboxApi/Client.html" title="DropboxApi::Client (class)">Client</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="DropboxApi/Client.html#initialize-instance_method" title="DropboxApi::Client#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>VofXAX8D...</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='comment'>#=&gt; #&lt;DropboxApi::Client ...&gt; @@ -172,11 +172,11 @@ <p>The instance of <code>Client</code> we&#39;ve initialized is the one you&#39;ll be using to perform API calls. You can check the class&#39; documentation to find <a href="http://jesus.github.io/dropbox_api/DropboxApi/Client.html">all available endpoints</a>.</p> -<h3>Large file uploads</h3> +<h3 id="large-file-uploads">Large file uploads</h3> <p>If you need to upload files larger than 150MB the default <code>#upload</code> endpoint won&#39;t work. Instead, you need to start a upload session and upload the file in small chunks.</p> @@ -192,25 +192,25 @@ <p>Check out the <a href="http://www.xuuso.com/dropbox_api/DropboxApi/Client.html#upload_by_chunks-instance_method">method documentation</a> to find out all available options.</p> -<h2>Dependencies</h2> +<h2 id="dependencies">Dependencies</h2> <p>This gem depends on <a href="https://github.com/oauth-xx/oauth2">oauth2</a> and <a href="https://github.com/lostisland/faraday">faraday</a>.</p> -<p>It has official support for Ruby versions <code>1.9.x</code> and <code>2.x</code>.</p> +<p>It has official support for Ruby versions <code>2.x</code>.</p> -<h2>Development</h2> +<h2 id="development">Development</h2> <p>After checking out the repo, run <code>bin/setup</code> to install dependencies. Then, run <code>bin/console</code> for an interactive prompt that will allow you to experiment.</p> -<h3>Testing</h3> +<h3 id="testing">Testing</h3> <p>I recommend you to use a test account other than your main one.</p> <p>We use VCR to record the HTTP calls to Dropbox, however we sometimes need to regenerate the cassettes. Let&#39;s take <code>list_folder</code> as an example to show what @@ -222,35 +222,40 @@ <li><p>Run the task to build the scaffolding in your Dropbox account so the tests will pass. If it doesn&#39;t exist you may need to write it yourself, check the <code>DropboxScaffoldBuilder</code> class to find all existing scaffold builders.</p> <pre class="code text"><code class="text">DROPBOX_OAUTH_BEARER=YOUR_AUTH_BEARER rake test:build_scaffold[list_folder] -</code></pre></li> +</code></pre> + +<p>Note that you&#39;ll have to type <code>rake test:build_scaffold\[list_folder\]</code> +if you use <code>zsh</code>.</p> + +<p>You can build all available scaffolds with just <code>rake test:build_scaffold</code>.</p></li> <li><p>Run the tests and the cassettes will be written:</p> <pre class="code text"><code class="text">DROPBOX_OAUTH_BEARER=YOUR_AUTH_BEARER rspec spec/endpoints/files/list_folder_spec.rb </code></pre></li> </ol> <p>The OAuth bearer shouldn&#39;t have been recorded in the cassette and it should&#39;ve been filtered. However, you may want to double check before pushing your updates to Github.</p> -<p>Tip: You can simply run <code>export DROPBOX_OAUTH_BEARER=YOUR_AUTH_BEARER</code> at +<p>Tip: you can simply run <code>export DROPBOX_OAUTH_BEARER=YOUR_AUTH_BEARER</code> at the beginning of your work session so you don&#39;t need to prefix it in every command line.</p> -<h2>Contributing</h2> +<h2 id="contributing">Contributing</h2> <p>Any help will be much appreciated. The easiest way to help is to implement one or more of the <a href="http://jesus.github.io/dropbox_api/file.api_coverage.html">endpoints that are still pending</a>. To see how the endpoints are implemented, check out the <code>lib/dropbox_api/endpoints</code> folder.</p> </div></div> <div id="footer"> - Generated on Fri May 31 17:53:31 2019 by + Generated on Sun Feb 7 11:51:54 2021 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.9.19 (ruby-2.6.2). + 0.9.26 (ruby-2.5.1). </div> </div> </body> </html> \ No newline at end of file