altmetric.rb 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +15 -15
  2. data/lib/altmetric.rb +0 -1
  3. metadata +2 -2
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Ruby Altmetric API Client
2
2
  -------------------------
3
3
 
4
- A simple Ruby client for the [Altmetric API][0].
4
+ A simple Ruby client for the [Altmetric API](http://api.altmetric.com/).
5
5
 
6
6
  Provides a basic client object for interacting with the API. Provides quick access to the JSON
7
7
  results or direct access to API responses.
@@ -12,16 +12,7 @@ Installation
12
12
  [sudo] gem install altmetric.rb
13
13
 
14
14
  Relies on the `json`, `uri_template` and `httpclient` gems.
15
-
16
- Basic Usage
17
- -----------
18
15
 
19
- require 'altmetric'
20
-
21
- client = Altmetric::Client.new()
22
- stats = client.doi("10.1038/news.2011.490")
23
- #do something with the stats
24
-
25
16
  Creating A Client
26
17
  -----------------
27
18
 
@@ -36,6 +27,18 @@ the commercial parts of the API (the `fetch`) calls
36
27
  client = Altmetric::Client.new(opts)
37
28
 
38
29
  Default `User-Agent` is currently `altmetric-ruby-client/0.0.1`
30
+
31
+ Basic Usage
32
+ -----------
33
+
34
+ require 'altmetric'
35
+
36
+ client = Altmetric::Client.new()
37
+ stats = client.doi("10.1038/news.2011.490")
38
+ #do something with the stats
39
+
40
+ There are methods on the client object that match each of the Altmetric API entry points, e.g. `doi`,
41
+ `arxiv`, `pmid`, etc.
39
42
 
40
43
  Read the Altmetric API documentation for notes on the structure of the responses and additional API parameters.
41
44
 
@@ -43,7 +46,7 @@ Rate Limiting
43
46
  -------------
44
47
 
45
48
  The client object will automatically inspect all responses and extract the HTTP headers that Altmetric
46
- uses for [rate limiting][1].
49
+ uses for [rate limiting](http://api.altmetric.com/index.html#rate_limiting).
47
50
 
48
51
  The latest header values are automatically added as integers to the `Altmetric::Client::LIMITS` hash,
49
52
  keyed on the header name. This simplifies monitoring limits over several requests, which may use different
@@ -55,7 +58,4 @@ License
55
58
  This work is hereby released into the Public Domain.
56
59
 
57
60
  To view a copy of the public domain dedication, visit http://creativecommons.org/licenses/publicdomain or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
58
-
59
-
60
- [0]. http://api.altmetric.com/
61
- [1]. http://api.altmetric.com/index.html#rate_limiting
61
+
@@ -1,5 +1,4 @@
1
1
  require 'json'
2
- require 'rest-client'
3
2
  require 'httpclient'
4
3
  require 'uri_template'
5
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: altmetric.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-21 00:00:00.000000000 Z
12
+ date: 2013-05-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json