Current section

Files

Jump to
yotsuba lib board.ex
Raw

lib/board.ex

defmodule Yotsuba.Board do
@moduledoc """
Module to interface with the board endpoint.
"""
alias Yotsuba.Client
@doc """
Returns a list of all boards.
"""
def all do
Client.get("boards.json")
end
@doc """
Returns all thread OPs (and the replies shown on indexes) from an individual board.
"""
def catalog(board) do
Client.get("/#{board}/catalog.json")
end
@doc """
Returns a list of thread IDs, their modification times, and respective pages.
"""
def threads(board) do
Client.get("/#{board}/threads.json")
end
@doc """
Returns a list of archived thread IDs.
"""
def archive(board) do
Client.get("/#{board}/archive.json")
end
@doc """
Returns a list of threads in a board's page.
"""
def page_threads(board, page) do
Client.get("/#{board}/#{page}.json")
end
end