Disqus Cartridge - Configuration Guidelines and Implementation Notes

Virtuoso's Sponger cartridge for Disqus allows you to fetch a Disqus user's profile, their posts, and data from discussion threads and forums they have participated in. These notes, intended for a 'Sponger Administrator', provide brief configuration guidelines for the cartridge.

Contents

Obtaining a Disqus API Key

The cartridge is written to the Disqus Web API. The API supports three methods for making authenticated API requests:

At the current time (May 2012) the cartridge uses an API key. To obtain an API key, you must register your Sponger instance as a Disqus application via the Applications panel on the Disqus "API Resources" page. Follow these steps to obtain an API key:

Supported URI Patterns

The cartridge is configured to trigger on the URI pattern http://disqus.com/.* . The expected starting point for sponging a Disqus user's profile is a URL of the form http://disqus.com/{username}. For example: http://disqus.com/kidehen

Disqus Pseudo URIs

With the exception of Disqus users, the Disqus API does not return RESTful URIs to the objects in their data space. All other objects are identified by a numeric ID, with no associated URI. Consequently, Disqus user profile URIs, of the form http://disqus.com/{username}, are the only entry points which can be used to initiate sponging. When a user's Disqus profile is first sponged, the cartridge initially materializes only the user's posts and partial descriptions of the threads they have been active in.

Each active thread is identified by a pseudo-URI of the form http://disqus.com/?@dsq_id@=thread:{thread_id}. These pseudo-URIs are Sponger constructs which allow the descriptions of Disqus discussion threads to reside in their own graphs and to allow incremental sponging. To be spongeable, the pseudo-URI must be dereferenceable. Disqus conveniently ignores the pseudo-URI query string which gets passed through to the Disqus cartridge.

By following these active thread pseudo-URIs, exposed in a user's sponged Disqus profile as oplbase:threads_participated_in property values, all the posts belonging to a thread can be retrieved. The full discussion thread and all the posts it contains are materialized in a separate sponge of http://disqus.com/?@dsq_id@=thread:{thread_id}. Forums are identified and sponged in a similar way, using pseudo-URIs like http://disqus.com/?@dsq_id@=forum:{forum_id}. Each thread and forum is contained in its own graph rather than being contained in the starting user's graph.

Paging Options

Because some Disqus collections can include hundreds of items (e.g. threads in a forum, or posts in a thread), the following cartridge options are available to set configurable limits on the number of items returned.

max_batches:

Related