producthunt 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/producthunt.rb +24 -18
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
ZWEwY2UxMTJhYTdlMWZiOWNiMjU3NTJkMmZlMDQwZjUwNmJmNzVhMg==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
NGJmOTdhYmJhMjU1ZTFhM2E2OTM4NjJlNTIxZjUzYWQ2NTJkZTlmNg==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
MGFkYTQ3NjZmYTQ2MWI4NjMxNTcwOWQ1Y2Y2ZTkxODM0NTQyZDM3NzM2Nzgy
|
|
10
|
+
OWZiN2NhZGQ5YzI1OWEyYmI2MmNmNjhjNzIzNmFjODZhMTdiYjA3N2EwNmU1
|
|
11
|
+
NzQxOTdmYTM0YTJjYmYxMDdlOWVkMzBiZDY0MjA5OWQ4YzYxOTQ=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
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
|
-
#
|
|
30
|
-
#
|
|
31
|
-
# "title"=>"
|
|
32
|
-
# "user"=>{"username"=>"
|
|
33
|
-
# "rank"=>1, "tagline"=>"
|
|
34
|
-
# "
|
|
35
|
-
#
|
|
36
|
-
#
|
|
37
|
-
# "
|
|
38
|
-
# "
|
|
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)
|