hexgnu / linkedin

Ruby wrapper for the LinkedIn API
http://rdoc.info/gems/linkedin
MIT License
756 stars 407 forks source link

new_connections returns all connections #244

Closed dodontommy closed 9 years ago

dodontommy commented 9 years ago

I am trying to retrieve all of the new connections from the beginning of today, but I am getting a mash containing all of my connections no matter what I try.

@current_time = Time.now.in_time_zone(params[:timezone].to_i)
@formatted_date = @current_time.beginning_of_day.to_i

puts linkedin.new_connections(@formatted_date)

This returns all of my connections. Is it something I'm doing wrong or is this method broken?

hundredwatt commented 9 years ago

@tommybstitch the value of modified-since is milliseconds since epoch [1]

Try:

@formatted_date = @current_time.beginning_of_day.to_i * 1000

[1] https://developer.linkedin.com/documents/connections-api