Class: Greentext::Client

Inherits:
Object
  • Object
show all
Includes:
Board, Post
Defined in:
lib/greentext/client.rb,
lib/greentext/client/post.rb,
lib/greentext/client/board.rb

Overview

Public: The Client to access the API

Examples

client = Greentext::Client.new
client.boards
# => [#<Greentext::Board>, ...

Defined Under Namespace

Modules: Board, Post

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Post

#expand

Methods included from Board

#boards, #threads

Constructor Details

#initialize {|_self| ... } ⇒ Client

Returns a new instance of Client.

Yields:

  • (_self)

Yield Parameters:



20
21
22
# File 'lib/greentext/client.rb', line 20

def initialize
  yield self if block_given?
end

Instance Attribute Details

#api_endpointObject

Public: Get the API Endpoint

Returns a String containing a URI.



27
28
29
# File 'lib/greentext/client.rb', line 27

def api_endpoint
  @api_endpoint
end