hn2json 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -0,0 +1,14 @@
1
+ HN2JSON
2
+ =======
3
+
4
+ Check out the documentation at: [http://rdoc.info/github/jcla1/HN2JSON/frames/](http://rdoc.info/github/jcla1/HN2JSON/frames/)
5
+
6
+ ```rb
7
+ item = HN2JSON.find 4623690
8
+
9
+ item.title
10
+ # => "HN2JSON: A ruby gem for HackerNews"
11
+
12
+ item.votes
13
+ # => 1
14
+ ```
@@ -3,37 +3,37 @@ module HN2JSON
3
3
  class Entity
4
4
 
5
5
  # Public: Returns the IDs of all top-level comments.
6
- attr_reader :comments
6
+ attr_accessor :comments
7
7
 
8
8
  # Public: Returns the String date when the Entity was posted to HackerNews.
9
- attr_reader :date_posted
9
+ attr_accessor :date_posted
10
10
 
11
11
  # Public: Return the String text of the Entity, if available.
12
- attr_reader :fulltext
12
+ attr_accessor :fulltext
13
13
 
14
14
  # Public: Returns the Integer ID of the Entity
15
- attr_reader :id
15
+ attr_accessor :id
16
16
 
17
17
  # Public: Returns the Integer ID of the parent, if available
18
- attr_reader :parent
18
+ attr_accessor :parent
19
19
 
20
20
  # Public: Returns the String username of the user who posted the Entity
21
- attr_reader :posted_by
21
+ attr_accessor :posted_by
22
22
 
23
23
  # Public: Returns the String title of the Entity, if available
24
- attr_reader :title
24
+ attr_accessor :title
25
25
 
26
26
  # Public: Returns the Symbol type of the Entity (:post, :poll, :discussion, :comment)
27
- attr_reader :type
27
+ attr_accessor :type
28
28
 
29
29
  # Public: Returns the String url of an Entity, if available
30
- attr_reader :url
30
+ attr_accessor :url
31
31
 
32
32
  # Public: Returns the Interger number of upvotes the Entity has recieved
33
- attr_reader :votes
33
+ attr_accessor :votes
34
34
 
35
35
  # Public: Returns a 2D Array of ["Thing you're voting on", number of upvotes]
36
- attr_reader :voting_on
36
+ attr_accessor :voting_on
37
37
 
38
38
 
39
39
  def initialize id
@@ -1,4 +1,4 @@
1
1
  module HN2JSON
2
2
  # Public: String current version of HN2JSON
3
- VERSION = '0.0.4'
3
+ VERSION = '0.0.5'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hn2json
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: