producthunt 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/lib/producthunt.rb +24 -18
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZmQ0MjFmMzhlMGZjNjkxN2EwNzIwZGU5OGE2NzcyMGNkNWY3NjA4Mg==
4
+ ZWEwY2UxMTJhYTdlMWZiOWNiMjU3NTJkMmZlMDQwZjUwNmJmNzVhMg==
5
5
  data.tar.gz: !binary |-
6
- ZDkxMWQxZTc1MDllZGQyZTM4YjU3NDAyZWQwYThlOGE1ZTJmODZmZg==
6
+ NGJmOTdhYmJhMjU1ZTFhM2E2OTM4NjJlNTIxZjUzYWQ2NTJkZTlmNg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Y2I0YjJjNzgzNGZhYzJlZDQyOTNlOTZjZDMwMjkzOGEyY2JjNTM2MjEzYzNi
10
- ZDAxZDVlZmMyYzQ1OTI3ZWM1NTVlMmQ3ZDY2NjQ1NDZmNjk4YjE2MDY4ZjA4
11
- MWE3NWE0MWRiM2M3YmRlYWZiMWY0ZDdjZTYwOTc0NTgyMDcwM2M=
9
+ MGFkYTQ3NjZmYTQ2MWI4NjMxNTcwOWQ1Y2Y2ZTkxODM0NTQyZDM3NzM2Nzgy
10
+ OWZiN2NhZGQ5YzI1OWEyYmI2MmNmNjhjNzIzNmFjODZhMTdiYjA3N2EwNmU1
11
+ NzQxOTdmYTM0YTJjYmYxMDdlOWVkMzBiZDY0MjA5OWQ4YzYxOTQ=
12
12
  data.tar.gz: !binary |-
13
- NTZlMjE3YjFiOWEwZjA1OWIyZDA1MWZkYmE0NjEwNmY3ZmNmNTg3MWE3NzI5
14
- ODZmMTQ5ZDU0ZjgzM2NjNTVhYzQ3MDYwMGM5ZmI1MDU4MDc5YmY1NDFiOWQy
15
- ZDUwNzY3YTk5YzlmM2UzNTdmMjM0MjY2YWUxNmFmNzAwODg2NDA=
13
+ YmEyNWQ1Yjk3ZmE2YjIyNDFjNjczZjQ4NTc0ZTUzMDkyNTg5YWNkMGQ0ODg5
14
+ NGY0MTE3Zjk3YjJhMzEzMGI1NzQyZjU4NzRiM2ExNjFhYzFlYTk0N2RmNWM3
15
+ OTFhZGU3ZDg2MGYyMWNmNzIyZmM5MjQ1MjA2OWZlZjRiMmI5ODA=
data/lib/producthunt.rb CHANGED
@@ -9,13 +9,13 @@ module ProductHunt
9
9
  # Example:
10
10
  # >> puts ProductHunt::Post.get_today
11
11
  # => { "status"=>"success",
12
- # "hunts"=>[
13
- # {
14
- # "title"=>"Wealthfront", "votes"=>10,
15
- # "user"=>{"username"=>"hunterwalk", "name"=>"Hunter Walk"},
16
- # "rank"=>2, "tagline"=>"Automated, low cost investment service",
17
- # "comment_count"=>"3", "permalink"=>"/posts/wealthfront", "url"=>"https://www.wealthfront.com/"
18
- # }, ... ]}
12
+ # => "hunts"=>[
13
+ # => {
14
+ # => "title"=>"Wealthfront", "votes"=>10,
15
+ # => "user"=>{"username"=>"hunterwalk", "name"=>"Hunter Walk"},
16
+ # => "rank"=>2, "tagline"=>"Automated, low cost investment service",
17
+ # => "comment_count"=>"3", "permalink"=>"/posts/wealthfront", "url"=>"https://www.wealthfront.com/"
18
+ # => }, ... ]}
19
19
  def self.get_today
20
20
  url = "http://hook-api.herokuapp.com/today"
21
21
  res = RestClient.get url
@@ -26,17 +26,23 @@ module ProductHunt
26
26
  #
27
27
  # Example:
28
28
  # >> puts ProductHunt::Post.get_comments("/posts/splashbase")
29
- # => { "status"=>"success",
30
- # "post"=>{
31
- # "title"=>"Wealthfront", "votes"=>10,
32
- # "user"=>{"username"=>"hunterwalk", "name"=>"Hunter Walk"},
33
- # "rank"=>1, "tagline"=>"Automated, low cost investment service", "comment_count"=>"3", "permalink"=>"/posts/wealthfront", "url"=>"https://www.wealthfront.com/"},
34
- # "comments"=>[
35
- # {
36
- # "index"=>1, "user"=>{"username"=>"hunterwalk", "name"=>"Hunter Walk"}, "timestamp"=>"6h ago",
37
- # "comment"=>"\n\nCEO is the awesome @adamnash - maybe he'll leap in here and answer any questions\n",
38
- # "comment_html"=>"\n\nCEO is the awesome <a href=\"https://twitter.com/adamnash\">@adamnash</a> - maybe he'll leap in here and answer any questions\n"
39
- # }, ... ]}}
29
+ # => {
30
+ # => "status"=>"success", "post"=>{
31
+ # => "title"=>"Splashbase", "votes"=>28,
32
+ # => "user"=>{"username"=>"gregoiregilbert", "name"=>"Grégoire Gilbert"},
33
+ # => "rank"=>1, "tagline"=>"Search & discover free, public domain, hi res photos",
34
+ # => "comment_count"=>"2", "permalink"=>"/posts/splashbase", "url"=>"http://www.splashbase.co"
35
+ # => }, "comments"=>[
36
+ # => {
37
+ # => "index"=>1, "user"=>{"username"=>"gregoiregilbert", "name"=>"Grégoire Gilbert"}, "timestamp"=>"1d ago",
38
+ # => "comment"=>"\n\nFollowing up the post about @foapapp http://www.producthunt.com/posts/foap few days ago,
39
+ # => this website organizes public domain, free to use photos from Unsplash.A good complement to
40
+ # => Compfight mentioned by @rrhoover. This could interest you @johnmurch\n",
41
+ # => "comment_html"=>"\n\nFollowing up the post about <a href=\"https://twitter.com/foapapp\">@foapapp</a>
42
+ # => <a href=\"http://www.producthunt.com/posts/foap\" target=\"_blank\">http://www.producthunt.com/posts/foap</a> few days ago,
43
+ # => this website organizes public domain, free to use photos from Unsplash.<br><br>A good complement to Compfight mentioned by
44
+ # => <a href=\"https://twitter.com/rrhoover\">@rrhoover</a>. <br><br>This could interest you <a href=\"https://twitter.com/johnmurch\">@johnmurch</a>\n"
45
+ # => }, ... ]}}
40
46
  #
41
47
  # Arguments:
42
48
  # permalink: (String)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: producthunt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - dugong