All Downloads are FREE. Search and download functionalities are using the official Maven repository.

talystcode.streaming-reddit_2.11.0.0.2.source-code.RedditDemoStandalone.scala Maven / Gradle / Ivy

The newest version!
import java.util.Date

import com.github.catalystcode.fortis.spark.streaming.reddit.RedditAuth
import com.github.catalystcode.fortis.spark.streaming.reddit.client.RedditClient

class RedditDemoStandalone(auth: RedditAuth) {
  def run(): Unit = {
    val keywords = List("healthcare")
    val client = new RedditClient(auth.applicationId, auth.secret)
    client.ensureFreshToken()
    println(client.search(keywords, limit = 2).toList)
    client.ensureFreshToken()
    client.revokeToken()
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy