Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4d63117
Prepare the namespace for the v4 API
risteskipetar Sep 19, 2023
339baac
Changes for api v4
risteskipetar Sep 20, 2023
4249e1e
Access token and refresh token
risteskipetar Sep 20, 2023
71621ba
Revoke access
risteskipetar Sep 20, 2023
48605e4
Merge pull request #1 from SparkLoop/update/ck-v4-namespace
ManuelFrigerio Sep 23, 2023
8948265
custom fields
ManuelFrigerio Sep 26, 2023
8d31572
subscribers
ManuelFrigerio Sep 26, 2023
6c012b6
tags
ManuelFrigerio Sep 26, 2023
18875f5
webhooks
ManuelFrigerio Sep 26, 2023
1ae2a5b
updated version
ManuelFrigerio Sep 26, 2023
f931fa1
Merge pull request #2 from SparkLoop:update-endpoints
ManuelFrigerio Sep 26, 2023
abad0f3
changes
ManuelFrigerio Sep 26, 2023
487040d
changed version
ManuelFrigerio Sep 26, 2023
2b1389f
Merge pull request #3 from SparkLoop:make-calls-coherent
ManuelFrigerio Sep 26, 2023
d559976
values
ManuelFrigerio Sep 26, 2023
4bb631d
version
ManuelFrigerio Sep 26, 2023
10f4b52
Merge pull request #4 from SparkLoop:further-improvements
ManuelFrigerio Sep 26, 2023
fae7758
changes
ManuelFrigerio Sep 26, 2023
ea780bf
version
ManuelFrigerio Sep 26, 2023
f64d035
Merge pull request #5 from SparkLoop:small-fixes
ManuelFrigerio Sep 26, 2023
2613b2a
ExpiredTokenError
ManuelFrigerio Sep 26, 2023
2705ad1
raise error
ManuelFrigerio Sep 26, 2023
254474d
version
ManuelFrigerio Sep 26, 2023
a09ee6a
Merge pull request #6 from SparkLoop:invalid-token-error
ManuelFrigerio Sep 26, 2023
a68d744
Fixes error handling
BilalBudhani Feb 6, 2024
98f4239
Updates version
BilalBudhani Feb 6, 2024
69d0326
Merge pull request #7 from BilalBudhani/error-handling-bug-fix
ManuelFrigerio Feb 6, 2024
716437f
endpoints
ManuelFrigerio Feb 6, 2024
a19e361
specs
ManuelFrigerio Feb 6, 2024
c044a65
updated version
ManuelFrigerio Feb 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

# Specify your gem's dependencies in convertkit-ruby.gemspec
# Specify your gem's dependencies in convertkit_v4-ruby.gemspec
gemspec

gem 'dotenv', '~> 2.1', '>= 2.1.1'
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Convertkit Ruby Client
# Convertkit V4 Ruby Client

A Ruby toolkit for [Convertkit](https://convertkit.com/) API.
A Ruby toolkit for [ConvertkitV4](https://convertkit.com/) API.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'convertkit-ruby', require: 'convertkit'
gem 'convertkit_v4-ruby', require: 'convertkit_v4'
```

And then execute:
Expand All @@ -16,29 +16,29 @@ And then execute:

Or install it yourself as:

$ gem install convertkit-ruby
$ gem install convertkit_v4-ruby

## Authentication

For private integrations, use your personal ``API_KEY`` and ``API_SECRET`` found in [your account settings.](https://app.convertkit.com/account/edit)
For private integrations, use your personal ``API_KEY`` and ``API_SECRET`` found in [your account settings.](https://app.ConvertkitV4.com/account/edit)

```ruby
require "dotenv"
Dotenv.load(".env.local")

Convertkit.configure do |config|
ConvertkitV4.configure do |config|
config.api_secret = ENV["API_SECRET"]
config.api_key = ENV["API_KEY"]
end

client = Convertkit::Client.new
client = ConvertkitV4::Client.new
```

## Usage

Calls for Convertkit API v3 are relative to the url [http://api.convertkit.com/v3](http://api.convertkit.com/v3).
Calls for ConvertkitV4 API v3 are relative to the url [developers.convertkit.com](developers.convertkit.com).

API actions are available as methods on the client object. Currently, the Convertkit client has the following methods:
API actions are available as methods on the client object. Currently, the ConvertkitV4 client has the following methods:


| Action | Method |
Expand All @@ -61,9 +61,9 @@ API actions are available as methods on the client object. Currently, the Conver

## Use Cases

Here are some common use cases for the Convertkit v3 API client.
Here are some common use cases for the ConvertkitV4 v4 API client.

First configure the ``convertkit-ruby`` gem with your ``API_KEY`` and ``API_SECRET``, and initialize a new client. After that, you can fetch data from your account.
First configure the ``convertkit_v4-ruby`` gem with your ``API_KEY`` and ``API_SECRET``, and initialize a new client. After that, you can fetch data from your account.

### List subscribers

Expand Down Expand Up @@ -99,9 +99,9 @@ To install this gem onto your local machine, run `bundle exec rake install`. To

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Atomoworks/convertkit-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
Bug reports and pull requests are welcome on GitHub at https://github.com/SparkLoop/convertkit-ruby-v4. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

1. Fork it ( https://github.com/Atomoworks/convertkit-ruby/fork )
1. Fork it ( https://github.com/SparkLoop/convertkit-ruby-v4/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
Expand Down
9 changes: 5 additions & 4 deletions bin/console
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#!/usr/bin/env ruby

require "bundler/setup"
require "convertkit"
require "convertkit_v4"
require "dotenv"

Dotenv.load(".env.local")

Convertkit.configure do |config|
config.api_secret = ENV["API_SECRET"]
config.api_key = ENV["API_KEY"]
ConvertkitV4.configure do |config|
config.client_id = ENV["CONVERTKIT_CLIENT_ID"]
config.client_secret = ENV["CONVERTKIT_CLIENT_SECRET"]
config.redirect_uri = ENV["CONVERTKIT_REDIRECT_URI"]
end

# You can add fixtures and/or initialization code here to make experimenting
Expand Down
14 changes: 7 additions & 7 deletions convertkit-ruby.gemspec → convertkit_v4-ruby.gemspec
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'convertkit/version'
require 'convertkit_v4/version'

Gem::Specification.new do |spec|
spec.name = "convertkit-ruby"
spec.version = Convertkit::VERSION
spec.authors = ["Manuel Frigerio"]
spec.email = ["manuel.frigerio@gmail.com"]
spec.name = "convertkit_v4-ruby"
spec.version = ConvertkitV4::VERSION
spec.authors = ["Manuel Frigerio", "Petar Risteski"]
spec.email = ["manuel.frigerio@gmail.com", "risteskipetar3@gmail.com"]

spec.summary = %q{A Ruby gem for interacting with the ConvertKit API v3}
spec.description = %q{A simple wrapper for the ConvertKit API}
spec.summary = %q{A Ruby gem for interacting with the Convertkit API v4}
spec.description = %q{A simple wrapper for the Convertkit V4 API}
spec.homepage = "https://manuel.friger.io"
spec.license = "MIT"

Expand Down
4 changes: 2 additions & 2 deletions fixtures/vcr_cassettes/account.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions fixtures/vcr_cassettes/add_subscriber_to_form.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions fixtures/vcr_cassettes/delete_custom_field.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions fixtures/vcr_cassettes/forms.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions fixtures/vcr_cassettes/get_custom_fields.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions fixtures/vcr_cassettes/new_custom_field.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions fixtures/vcr_cassettes/update_custom_field.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 0 additions & 31 deletions lib/convertkit/client.rb

This file was deleted.

27 changes: 0 additions & 27 deletions lib/convertkit/client/custom_fields.rb

This file was deleted.

36 changes: 0 additions & 36 deletions lib/convertkit/client/subscribers.rb

This file was deleted.

Loading