4chan API Client Library
1 Procedures
4chan-data
4chan-data-page
4chan-data-catalog
4chan-data-thread
4chan-catalog-search
4chan-thread-match-fn
4chan-thread-is-lisp-general?
4chan-catalog-find-lisp-general
4chan-thread-url
7.0

4chan API Client Library

 (require yotsubAPI) package: yotsubAPI

yotsubAPI is an interface to the 4chan JSON API. The catalog is a list of threads and the threads are hasheq’s.

1 Procedures

procedure

(4chan-data board x)  (listof hash-eq?)

  board : string?
  x : (or/c string? number?)
This procedure is used as the backbone for many other procedures.

It takes a board identifier (e.g. "g" or "a") and either a thread number or the string "catalog".

procedure

(4chan-data-page board n)  (listof hash-eq?)

  board : string?
  n : number?
This procedure takes a board identifier as a string and a page number and returns a list of hashes with information about the page.

procedure

(4chan-data-catalog board)  (listof hash-eq?)

  board : string?
This procedure takes a board identifier and returns a list of hashes containing information about that board’s catalog.

procedure

(4chan-data-thread board id)  (listof hash-eq?)

  board : string?
  id : number?
This procedure takes a board identifier and a thread number and returns a hasheq containing the information about that thread.

procedure

(4chan-catalog-search catalog pattern)  (listof hash-eq?)

  catalog : hash-eq?
  pattern : (or/c regexp? byte-regexp? string? bytes?)
This procedure takes a list of hashes (created from running 4chan-data-catalog) and a regexp pattern to search and returns a hasheq containing the search results.

procedure

(4chan-thread-match-fn pattern)  procedure?

  pattern : (or/c regexp? byte-regexp? string? bytes?)
This procedure is a helper procedure where you provide a pattern and it will return a procedure that you apply to a thread’s hasheq.

procedure

(4chan-thread-is-lisp-general? thread)  boolean?

  thread : hash-eq?
This procedure is a helper procedure takes takes a thread’s hasheq and will return a boolean value.

procedure

(4chan-catalog-find-lisp-general catalog)  hash-eq?

  catalog : (listof hash-eq?)
This procedure takes a catalog’s hasheq and returns the hasheq for the first Lisp General it finds, if it exists.

procedure

(4chan-thread-url board thread)  string?

  board : string?
  thread : hash-eq?
This procedure takes a board identifier and a thread’s hasheq and returns its URL as a string.