Class: SocialCurrent::GithubService

Inherits:
Service
  • Object
show all
Includes:
HTTParty
Defined in:
lib/social_current/github_service.rb

Instance Method Summary collapse

Methods inherited from Service

#fetch, #initialize

Constructor Details

This class inherits a constructor from SocialCurrent::Service

Instance Method Details

#raw_streamObject



10
11
12
# File 'lib/social_current/github_service.rb', line 10

def raw_stream
  fetch("/users/#{@user}/events", "#{@user}_github_raw_stream.json")
end

#raw_userObject



6
7
8
# File 'lib/social_current/github_service.rb', line 6

def raw_user
  fetch("/users/#{@user}", "#{@user}_github_raw_user.json")
end

#streamObject



14
15
16
17
18
# File 'lib/social_current/github_service.rb', line 14

def stream
  raw_stream.collect do |s|
    { :message => format_message(s), :created_at => Time.parse(s["created_at"]).utc, :service => "github" }
  end
end