Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ There are two ways you can provide credentials to the gnip-api gem.

* Pass them to the initialize method

`Gnip::Rules.new( "chieflarl@larlbang.com", "larl!operator" ,'https://stream.gnip.com/.../YOUR_ACCOUNT/.../prod' )`
`Gnip::Rules.new( "chieflarl@larlbang.com", "larl!operator" ,'https://api.gnip.com/.../YOUR_ACCOUNT/.../prod' )`

* Via a configuration file at config/gnip.yml

```yaml
development: &development
username: chieflarl@larlbang.com
password: larl!operator
streaming_url:'https://stream.gnip.com:443/accounts/YOUR_ACCOUNT/publishers/twitter/streams/track/prod'
api_url:'https://api.gnip.com:443/accounts/YOUR_ACCOUNT/publishers/twitter/streams/track/prod'
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions lib/gnip-rules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def initialize( configuration = nil, username = nil, password = nil, uri = nil )
load_credentials!
username = @config["username"]
password = @config["password"]
uri = uri || @config["streaming_url"]
uri = uri || @config["api_url"]
end

self.class.basic_auth username , password
Expand Down Expand Up @@ -55,7 +55,7 @@ def load_credentials!
username: omg@omg.com
password: larl!
account: larloperator
streaming_url: 'https://stream.gnip.com:443/accounts/YOUR_ACCOUNT/publishers/twitter/streams/track/prod/'
api_url: 'https://api.gnip.com/accounts/YOUR_ACCOUNT/publishers/twitter/streams/track/prod/'

RUBY
)
Expand Down