Skip to content

Commit

Permalink
Merge pull request #1 from uncleoptimus/uncleoptimus-resultsTimeFrame
Browse files Browse the repository at this point in the history
Added timeframe property to allow finer-grained search. Modified URL and newURL accordingly
  • Loading branch information
ndrewr committed May 8, 2015
2 parents 466e6d1 + b0813de commit 37d0bb4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,16 @@ google('node.js best practices', function (err, next, links){
})
```

You can specify results in a certain timeframe. Defaults to results in the last year. The values work as such (choose one):
You can specify results in a certain timeframe. Defaults to results in the last year. Working values listed below:

```js
var google = require('google')

google.resultsTimeFrame = 'h' //information indexed in the past hour
google.resultsTimeFrame = 'd' //information indexed in the past day
google.resultsTimeFrame = 'w' //information indexed in the past week
google.resultsTimeFrame = 'm' //information indexed in the past month
// assign one of the values below. Defaults to google.resultsTimeFrame = 'y' for past year results
google.resultsTimeFrame = 'h' // information indexed in the past hour
google.resultsTimeFrame = 'd' // information indexed in the past day
google.resultsTimeFrame = 'w' // information indexed in the past week
google.resultsTimeFrame = 'm' // information indexed in the past month
```

You can also specify the TLD of the Google search page and the language.
Expand Down

0 comments on commit 37d0bb4

Please sign in to comment.