Snuze core classes
The classes described here are in the
Snuze core class overview
The Snuze "core" classes are those that aren't part of a more specific component.
Most classes in the Snuze package share the
SnuzeObject class as a common
ancestor. This design is a little odd, but it serves to automatically give each
object an internal unique ID, a standard way of identifying itself, and direct
access to several logging methods.
\snuze\SnuzeObject class is the ultimate ancestor of most objects in the
Snuze package. It provides some debugging scaffolding, as described above. With
the exception of
SnuzeFactory, the other classes described
in this section extend
\snuze\AuthenticationState class holds information about the current
authenticated session with the API server. This includes the Reddit account
credentials, an AccessToken object, and a
to track the status of the API's rate limit mechanism.
\snuze\RateLimitBucket class keeps track of the state of Reddit's rate
limiter. The Reddit API allows users to make a certain number of requests in
a given 10-minute period. When a request is made to the API, the response headers
indicate how many requests remain in the current time slice, and when the bucket
will be refilled.
\snuze\Snuze class is the public interface to Snuze. This is the object
your script will create and interact with. See Using Snuze
for a look at its methods and how to use them.
\snuze\SnuzeFactory class is responsible for accepting and validating an
array of configuration parameters, setting up the environment, then building
and returning a
Snuze object. See Getting Started
for an example of using
SnuzeFactory to get a