Class: Fizzy::Services::BaseService

Inherits:
Object
  • Object
show all
Defined in:
lib/fizzy/services/base_service.rb

Overview

Base service class for Fizzy API services.

Provides shared functionality for all service classes including:

  • HTTP method delegation (http_get, http_post, etc.)

  • Pagination support

  • Operation hooks (with_operation, wrap_paginated)

Examples:

class CardsService < BaseService
  def list(board_id:)
    paginate("/boards/#{board_id}/cards")
  end
end

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ BaseService

Returns a new instance of BaseService.

Parameters:

  • client (Object)

    the parent client (Client)



23
24
25
26
# File 'lib/fizzy/services/base_service.rb', line 23

def initialize(client)
  @client = client
  @hooks = client.hooks
end