Class: MailchimpAPI::Resource Private

Inherits:
Object
  • Object
show all
Defined in:
lib/mailchimp-api/resource.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Base class for all REST APIs collections

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Collection

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Initializes Resource

Parameters:

  • client (Client)

    current client



16
17
18
# File 'lib/mailchimp-api/resource.rb', line 16

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns current client.

Returns:

  • current client



8
9
10
# File 'lib/mailchimp-api/resource.rb', line 8

def client
  @client
end

Class Method Details

.clientObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns global client.

Returns:

  • global client



21
22
23
# File 'lib/mailchimp-api/resource.rb', line 21

def self.client
  MailchimpAPI.client
end