CrossClj

1.0.0 docs

SourceDocs



RECENT
    VARS
    bot-items
    bots
    debug
    default-bot
    init-bot
    map'
    now
    run-bot
    run-once
    start
    stop
    subtract-mins
    update-last-run
    with-log

    « Index of all namespaces of this project

    A framework for running reddit bots.
    
    Private
    (bot-items {:keys [subreddits type last-run delay], :as bot})
    macro
    (debug & forms)
    Debug mode - responses won't actually be performed.
    
    Private
    (default-bot)
    A bot that doesn't do anything. Custom bots 'extend'
    this object.
    (init-bot bot key)
    Merge with the default bot and get ready to run.
    Don't use with start.
    Private
    (now)
    (run-bot {:keys [key interval cancelled], :as bot})
    Repeatedly run-once.
    
    (run-once {:keys [key handler user-agent retry], :as bot})
    Retrieve aproppriate items for a bot,
    map handler over them, run the response.
    (start bot)(start bot key)
    Initialise a bot and begin running it.
    
    Private
    (subtract-mins date mins)
    Private
    (update-last-run bot date)
    macro
    (with-log log & forms)
    Provide a function to be used for logging.