Module: PackageCloud::Auth

Defined in:
lib/package_cloud/auth.rb

Class Method Summary collapse

Class Method Details

.get_token(url) ⇒ Object


7
8
9
10
# File 'lib/package_cloud/auth.rb', line 7

def get_token(url)
  url = PackageCloud::Util.compute_url(url, "/api/v1/token.json")
  JSON.parse(RestClient.get(url))["token"]
end