class Api2ch::Threads

Public Class Methods

new(board, page) click to toggle source
# File lib/api_2ch/methods/threads.rb, line 3
def initialize(board, page)
  @board = board
  @page  = page
end

Public Instance Methods

call() click to toggle source
# File lib/api_2ch/methods/threads.rb, line 13
def call
  response = HTTParty.get("#{BASE_URL}#{@board}/threads.json")
  JSON.parse(response.body)
end
full() click to toggle source
# File lib/api_2ch/methods/threads.rb, line 8
def full
  response = HTTParty.get("#{BASE_URL}#{@board}/#{@page}.json")
  JSON.parse(response.body)
end