Giter VIP home page Giter VIP logo

convertkit-ruby's People

Contributors

manuelfrigerio avatar mikenicklas avatar mjbass avatar mrhead avatar mykingedem avatar palleas avatar rfunduk avatar whatcould avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

convertkit-ruby's Issues

Error handling

Right now, this gem doesn't do any error handling. This introduces inconsistent behaviour in case of errors:

irb(main):001:0> client = Convertkit::Client.new
#<Convertkit::Client:0x00007f96030ecc20 @api_secret=nil, @api_key=nil>
irb(main):002:0> client.forms
nil
irb(main):003:0> client.custom_fields
nil
irb(main):004:0> client.subscribers
{
              :method => :get,
                :body => {
          "error" => "Authorization Failed",
        "message" => "API Key not present"
    },
... # this is Faraday::Response
irb(main):005:0> client.account
{
      "error" => "Authorization Failed",
    "message" => "API Key not present"
}

I could handle this in my own wrapper around this gem, but it would be much easier to handle errors directly in the gem. In that case we could raise errors based on on HTTP response, like:

  • Convertkit::AuthorizationError for HTTP 401
  • Convertkit::ServerError for HTTP 500
  • Convertkit::BadRequest for HTTP 422
  • Convertkit::ConnectionFailed instead of Faraday::ConnectionFailed
  • etc.

@rkcudjoe Would you accept a PR which implements this?

Mocking HTTP calls ?

Hey!

I just stumbled upon your library and I wanted to contribute. I just realized that the spec aren't mocking the HTTP calls, is it OK if I add webmock for example? That'd be easier to contribute then.

Please let me know what you think :)

Not updated in RubyGems.org

If I grab this gem from RubyGems.org with v0.0.2, alot of the changes including Form and Account are not included in the gem.

Currently I need to define in my Gemfile file as follows:

gem 'convertkit-ruby', git: 'https://github.com/HookOps/convertkit-ruby', require: 'convertkit'

Can you please update the gem version on RubyGems.org?

Support for webhooks

Hi @rkcudjoe

I've noticed your gem is missing support for webhooks. I'm happy to contribute.
Do you accepts PRs?

Cheers

Inconsistency for "def remove_tag_from_subscriber"

Definition in module Subscriber on line 31 is
def remove_tag_from_subscriber(subscriber_id, tag_id)

Definition in module Tags on line 17 is
def remove_tag_from_subscriber(tag_id, subscriber_id)

Which may lead to confusion.

Please create a new release

Can we get a new release please? The current version of this gem on RubyGems.org is over 3 years old. A lot of new stuff has been added in that time, including the #remove_tag_from_subscriber method which I'd like to use.

Update README

Update README to show new installation instructions

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.