Class: NpmApi::Client
- Inherits:
-
Object
- Object
- NpmApi::Client
- Defined in:
- lib/npm_api/client.rb
Class Method Summary collapse
Class Method Details
.get(path) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/npm_api/client.rb', line 4 def self.get(path) base_url = "https://api.npmjs.org/" url = base_url + path res = RestClient.get(url) JSON.parse(res.body) end |