Class: Api2ch::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/api_2ch/request.rb

Instance Method Summary collapse

Constructor Details

#initialize(board = 'b') ⇒ Request

Returns a new instance of Request.



3
4
5
# File 'lib/api_2ch/request.rb', line 3

def initialize(board = 'b')
  @board = board
end

Instance Method Details

#call_full_threads(board, page = 'index') ⇒ Object



7
8
9
# File 'lib/api_2ch/request.rb', line 7

def call_full_threads(board, page = 'index')
  Api2ch::Threads.new(board, page).full
end

#call_latest_bump_threads(board) ⇒ Object



19
20
21
# File 'lib/api_2ch/request.rb', line 19

def call_latest_bump_threads(board)
  Api2ch::LatestThreads.new(board).call
end

#call_most_viewed_threads(board) ⇒ Object



23
24
25
# File 'lib/api_2ch/request.rb', line 23

def call_most_viewed_threads(board)
  Api2ch::ViewedThreads.new(board).call
end

#call_new_threads(board) ⇒ Object



27
28
29
# File 'lib/api_2ch/request.rb', line 27

def call_new_threads(board)
  Api2ch::NewThreads.new(board).call
end

#call_thread_posts(board, num) ⇒ Object



15
16
17
# File 'lib/api_2ch/request.rb', line 15

def call_thread_posts(board, num)
  Api2ch::Posts.new(board, num).call
end

#call_threads(board) ⇒ Object



11
12
13
# File 'lib/api_2ch/request.rb', line 11

def call_threads(board)
  Api2ch::Threads.new(board, nil).call
end