O'Reilly logo

Clojure for Domain-specific Languages by Kelker Ryan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Handling search queries

For brevity, this section will only cover retrieving the username, screen name, date, and text of the search results. Please refer to the documentation of the twitter4j library for more information. The documentation page for the QueryResult class is located at http://twitter4j.org/oldjavadocs/3.0.3/twitter4j/QueryResult.html.

Adding the tdsl.search namespace

The search capabilities should go in their own namespace, so you'll need to create a new file at tdsl/src/tdsl/search.clj. The namespace of this file should use two dynamic variables from the tdsl.core namespace, namely *twitter* and *tweets*. The namespace also needs to import the Query class from the twitter4j Java library. If done correctly, the beginning of the file ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required