Class: Convertkit::Client
- Inherits:
-
Object
- Object
- Convertkit::Client
- Includes:
- Account, CustomFields, Forms, Sequences, Subscribers, Tags, Webhooks
- Defined in:
- lib/convertkit/client.rb,
lib/convertkit/client/tags.rb,
lib/convertkit/client/forms.rb,
lib/convertkit/client/account.rb,
lib/convertkit/client/webhooks.rb,
lib/convertkit/client/sequences.rb,
lib/convertkit/client/subscribers.rb,
lib/convertkit/client/custom_fields.rb
Defined Under Namespace
Modules: Account, CustomFields, Forms, Sequences, Subscribers, Tags, Webhooks
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#api_secret ⇒ Object
Returns the value of attribute api_secret.
Instance Method Summary collapse
- #connection ⇒ Object
-
#initialize(api_key = nil, api_secret = nil) ⇒ Client
constructor
A new instance of Client.
Methods included from Tags
#add_subscriber_to_tag, #create_tag, #create_tags, #remove_tag_from_subscriber, #remove_tag_from_subscriber_by_email, #subscriptions_to_tag, #tags
Methods included from Webhooks
#create_webhook, #remove_webhook
Methods included from Subscribers
#remove_tag_from_subscriber, #subscriber, #subscriber_tags, #subscribers, #unsubscribe, #update_subscriber
Methods included from Sequences
#add_subscriber_to_sequence, #sequences
Methods included from Forms
#add_subscriber_to_form, #forms
Methods included from CustomFields
#add_custom_field, #custom_fields, #delete_custom_field, #update_custom_field
Methods included from Account
Constructor Details
#initialize(api_key = nil, api_secret = nil) ⇒ Client
Returns a new instance of Client.
22 23 24 25 |
# File 'lib/convertkit/client.rb', line 22 def initialize( api_key=nil, api_secret=nil ) @api_secret = api_secret || Convertkit.configuration.api_secret @api_key = api_key || Convertkit.configuration.api_key end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
20 21 22 |
# File 'lib/convertkit/client.rb', line 20 def api_key @api_key end |
#api_secret ⇒ Object
Returns the value of attribute api_secret.
20 21 22 |
# File 'lib/convertkit/client.rb', line 20 def api_secret @api_secret end |
Instance Method Details
#connection ⇒ Object
27 28 29 |
# File 'lib/convertkit/client.rb', line 27 def connection @connection ||= Connection.new(api_key: api_key, api_secret: api_secret) end |