Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I have contacted Heroku for the same thing, and they just pointed me at <a href="http://github.com/heroku/heroku/blob/master/lib/heroku/client.rb#L120" rel="noreferrer">their api</a>, and said it is fine to use it that way.</p> <blockquote> <p>I'm afraid there isn't. <a href="http://github.com/heroku/heroku/blob/master/lib/heroku/client.rb#L120" rel="noreferrer">Our API</a> is "documented" only by the code of the client.</p> <p>You may find our google group helpful for getting advice from community members as well: <a href="http://groups.google.com/group/heroku/" rel="noreferrer">http://groups.google.com/group/heroku/</a></p> <p>Oren</p> </blockquote> <p>Here's the simple how-to:</p> <pre><code>require 'heroku' heroku = Heroku::Client.new('heroku_username', 'heroku_password') heroku.add_domain('heroku_app_name', 'example.com') heroku.remove_domain('heroku_app_name','example.com') </code></pre> <p>See <a href="http://github.com/heroku/heroku/blob/master/lib/heroku/client.rb#L120" rel="noreferrer">the api</a> for more.</p> <p>Of course I'd recommend against putting a plaintext password into your code. A nice thing you can do is use the heroku environment variables to get your passwords out of the code.</p> <pre><code>heroku = Heroku::Client.new(ENV['HEROKU_USER'], ENV['HEROKU_PASSWORD']) </code></pre> <p>and then you can set the environment variables on your app with </p> <pre><code>$&gt; heroku config:add HEROKU_USER='heroku_username' $&gt; heroku config:add HEROKU_PASSWORD='heroku_password' </code></pre> <p>from the command line.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload