Class: Serel::Event

Inherits:
Base
  • Object
show all
Defined in:
lib/serel/event.rb

Overview

The Event class represents a Stack Exchange event.

Finding events

You can use the all and get finder methods to retrieve events. Both of these require authentication, so access_token must be called before the finders.

all

Serel::Event.access_token(token).all

Retrieves (by default) all the events on the site in the last 5 minutes. The since method can be called to change this return events upto 15 minutes ago. This method is safe to call, since even on Stack Overflow only roughly 3 pages of events are generated every 5 minutes.

get

Serel::Event.access_token(token).get

Retrieves a page of Events. As per the all method above, this defaults to events in the last 5 minutes.

Method Summary

Methods inherited from Base

#[], #[]=, #all, associations, attribute, config, #find, finder_methods, #get, #initialize, #inspect, #meth, method_missing, #network, network_wide, new_relation, request, respond_to?, #type, with_ids

Constructor Details

This class inherits a constructor from Serel::Base