Skip to content
Browse files

readme

  • Loading branch information...
1 parent e43a89d commit 74b60040003e7c3930274438e897cc1af5130c72 andrea@SONGOKU committed Sep 10, 2010
Showing with 11 additions and 11 deletions.
  1. +11 −11 README.rdoc
View
22 README.rdoc
@@ -22,33 +22,33 @@ before using it.
You can get entries on the main page with:
- Entry.all # returns an array of entries
+ Entry.all # returns the main page's entries as an array
You can provide a number of pages:
- Entry.all(3) # will return the entries on the first 3 pages
+ Entry.all(3) # will return the entries on the first 3 pages
There are methods for getting specific entry types:
Entry.questions # gets the first page of questions (ask NH)
- Entry.newest # get the first page of new links (new)
- Entry.jobs # get the first page of job offest (jobs)
+ Entry.newest # gets the first page of new links (new)
+ Entry.jobs # gets the first page of job offerts (jobs)
Each Entry instance has the following data:
- entry = Entry.all.first # get the top entry on the mainpage
+ entry = Entry.all.first # gets the top entry on the mainpage
- entry.number # entry's position on HN
+ entry.number # the entry's position on HN
entry.link.title # the link's name on HN
entry.link.href # the actual link
- entry.link.site # the referring's site, if any
+ entry.link.site # the referring site, if any
entry.voting.score # the entry's score on HN
- entry.user.name # submitter's user name
+ entry.user.name # the submitter's user name
- entry.time # elapsed time from submission
+ entry.time # the elapsed time from submission
After you've logged in (see below) you can do the following
@@ -66,7 +66,7 @@ You get an entry's comments with:
You can also get the newest comments on HN with:
Comments.newest
- Comments.newest(3) # get the first 3 pages of new comments
+ Comments.newest(3) # gets the first 3 pages of new comments
Each Comment instance has the following data:
@@ -79,7 +79,7 @@ Each Comment instance has the following data:
Comments are enumerable and threaded, so you can do like:
comment[2][0] # gets the third reply to this comment, then the first reply to the reply
- comment.first # get the first reply to this comment
+ comment.first # gets the first reply to this comment
comment.select do |c| # gets all the comment replies which text contains "test"
text ~= /test/
end

0 comments on commit 74b6004

Please sign in to comment.
Something went wrong with that request. Please try again.