Giter Site home page Giter Site logo

Comments (6)

nateleavitt avatar nateleavitt commented on June 18, 2024

Hi @ESouza ,

I apologize.. I just realized earlier today that my gem update (1.3.6) is only compatible with Ruby 3. Until I update it go ahead and install 1.3.5 and see if that fixes your problem.

from infusionsoft.

ESouza avatar ESouza commented on June 18, 2024

@nateleavitt thank you yes that did solve the issue. Much appreciated it. Thank you

from infusionsoft.

ESouza avatar ESouza commented on June 18, 2024

@nateleavitt quick question, if I need to pull all Tags on Keap and possibly add and remove some tags using the gem, how should I go about it? Thank you

from infusionsoft.

nateleavitt avatar nateleavitt commented on June 18, 2024

Hi @ESouza,

There are a couple ways to do that. Since version 1.3.5 I have added the ability to access the rest api with Keap. So you can do it either with the xmlrpc or rest api. I am currently in the process of renaming the gem (keap) and will be adding additional documentation.

For xmlrpc you would do something like this:

infusion_tag = {"GroupName" => "Tag Name", "GroupCategoryId" => category_id}
tag_id = Infusionsoft.data_add(:ContactGroup, infusion_tag)

for rest you would do this:

 payload = {
      category: {
        id: tag_category_id
      },
      description: 'Tag Description',
      name: 'Tag Name'
    }

    # create tag
    tag = Infusionsoft.post('/tags', @token, payload: payload)

from infusionsoft.

nateleavitt avatar nateleavitt commented on June 18, 2024

I just read your comment and realized I may have misunderstood. To pull all tags you would do something like the following:

# xmlrpc
# access the `ContactGroup` table (https://developer.infusionsoft.com/docs/table-schema/)
tags = Infusionsoft.data_query(:ContactGroup, 1000, 0, {}, [:Id, :GroupName])

or

# rest api
tags = Infusionsoft.get("/tags", @token, query: { offset: 0, limit: 1000 })

from infusionsoft.

ESouza avatar ESouza commented on June 18, 2024

Amazing. Thank you so much for your help.

from infusionsoft.

Related Issues (20)

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.