Liking cljdoc? Tell your friends :D

ragtacts.loader.web


get-textclj

(get-text url)
(get-text url {:keys [last-modified etag]})

Return the text of a web page.

Args:

  • url: A string with the URL of the web page.
  • last-change: A map with the following keys
    • :last-modified: A string with the last modified date.
    • :etag: A string with the etag.

Returns:

  • A map with the following
    • :id: A string with the document id.
    • :text: A string with the document text.
    • :metadata: A map with the document metadata.
Return the text of a web page.
 
Args:
- url: A string with the URL of the web page.
- last-change: A map with the following keys
  - `:last-modified`: A string with the last modified date.
  - `:etag`: A string with the etag.
 
Returns:
- A map with the following
  - `:id`: A string with the document id.
  - `:text`: A string with the document text.
  - `:metadata`: A map with the document metadata.
sourceraw docstring

stop-watchclj

(stop-watch pool)

Stop a web page watch pool.

Stop a web page watch pool.
sourceraw docstring

watchclj

(watch {:keys [url interval last-change]} callback)

Watch a web page for changes.

Args:

  • url: A string with the URL of the web page.
  • interval: An integer with the interval in milliseconds.
  • callback: A function that receives a map with the following
    • :type: A keyword with the change type. It can be :create, :update, or :delete.
    • :doc: A map with the following keys
      • :id: A string with the document id.
      • :text: A string with the document text.
      • :metadata: A map with the document metadata.

Returns:

  • A pool that can be stopped with stop-watch.
Watch a web page for changes.

Args:
- url: A string with the URL of the web page.
- interval: An integer with the interval in milliseconds.
- callback: A function that receives a map with the following
  - `:type`: A keyword with the change type. It can be `:create`, `:update`, or `:delete`.
  - `:doc`: A map with the following keys
    - `:id`: A string with the document id.
    - `:text`: A string with the document text.
    - `:metadata`: A map with the document metadata.

Returns:
- A pool that can be stopped with `stop-watch`.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close