Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

merge for release #11

Merged
merged 5 commits into from
Oct 28, 2015
Merged
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
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ Please refer to [Event Server documentation](https://docs.prediction.io/datacoll
### Instantiate Event Client and connect to PredictionIO Event Server

```ruby
require 'predictionio'

# Define environment variables.
ENV['PIO_THREADS'] = 50 # For async requests.
ENV['PIO_THREADS'] = '50' # For async requests.
ENV['PIO_EVENT_SERVER_URL'] = 'http://localhost:7070'
ENV['PIO_ACCESS_KEY'] = 'YOUR_ACCESS_KEY' # Find your access key with: `$ pio app list`.

# Create PredictionIO event client.
client = PredictionIO::EventClient.new(ENV['PIO_ACCESS_KEY'], ENV['PIO_EVENT_SERVER_URL'], ENV['PIO_THREADS'])
client = PredictionIO::EventClient.new(ENV['PIO_ACCESS_KEY'], ENV['PIO_EVENT_SERVER_URL'], Integer(ENV['PIO_THREADS']))
```

### Create a `$set` user event and send it to Event Server
Expand Down
1 change: 1 addition & 0 deletions lib/predictionio/event_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# License:: Apache License, Version 2.0

require 'date'
require "net/http"

module PredictionIO
# This class contains methods that interface with the PredictionIO Event
Expand Down