insightly / insightly-ruby Goto Github PK
View Code? Open in Web Editor NEWRuby Library for the Insightly REST API
Ruby Library for the Insightly REST API
Insightly2.client.methods.include?(:create_team) # => true
Cool!
Insightly2.client.methods.include?(:create_lead) # => false
Not cool.
Trying to figure this out as we speak, but if anyone already did please let me know.
Will this be updated to support 3.0? Are folks using this gem now for 3.0?
Just to make sure: it's ok to change the Insightly2.api_key several times right?
I seem to randomly get these messages:
INSIGHTLY starting [get] request to [Contacts] with no payload
Although the only thing I do is:
Insightly2.api_key = user.insightly['insightly_key']
contacts = Insightly2.client.get_contacts
I also do this when the user first enters their api key in my application. If the key is incorrect I rescue the exception and give notice that the key is incorrect. I noticed that when I first start with a good key, the next requests keep being good although I can change my Insightly2.api_key to a bad one, the Insightly2.client.get_contacts keeps working. When I start off with a bad one, the good ones don't work anymore afterwards.
Just an FYI for people following this project, we will soon be releasing the v2.2 version of the web API. As part of this release we will be using Swagger to generate SDKs for most languages, and also documentation. Watch this space for news about the new version, or contact me directly at [email protected]
Firstly, thank you dior001, et al for creating this gem! I'm trying to get the API set up for our company.
Insightly2.api_key = ENV["INSIGHTLY_API_KEY"]
Insightly2.client.get_opportunities
This works great, and I am able to access our data. However, when I then try:
opportunity_attributes = {"OPPORTUNITY_NAME"=>"Test123"}
Insightly2.client.create_opportunity(opportunity: opportunity_attributes)
I get a Insightly2::Errors::ClientError I'm not really sure how to debug from here, and any help would be appreciated. I am admittedly something of noob, and I did notice your note about serialization of JSON, but haven't found a solution down that path so far.
Took me a little bit to figure that out, would be great to get a readme mention or warning.
Works in rails 4
I'm just getting started with the Insightly API in general and this gem in particular. I've installed the gem and loaded up a Rails console to begin experimenting.
I started with the sample usage in the readme and immediately ran into an error:
$ rails console
[1] pry(main)> Insightly2.api_key = < my actual API key here >
=> "< my actual API key >"
[2] pry(main)> contacts = Insightly2.client.get_contacts
SyntaxError: /usr/local/lib/ruby/gems/2.0.0/gems/insightly2-0.1.7/lib/insightly2/dsl/comments.rb:10: syntax error, unexpected ')'
/usr/local/lib/ruby/gems/2.0.0/gems/insightly2-0.1.7/lib/insightly2/dsl/comments.rb:21: syntax error, unexpected ','
def create_comment_attachment(id:, filename:)
^
/usr/local/lib/ruby/gems/2.0.0/gems/insightly2-0.1.7/lib/insightly2/dsl/comments.rb:32: syntax error, unexpected ')'
/usr/local/lib/ruby/gems/2.0.0/gems/insightly2-0.1.7/lib/insightly2/dsl/comments.rb:35: syntax error, unexpected keyword_end, expecting end-of-input
from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
My versions:
Thanks.
I installed the gem via bundler, and following the instructions, I type:
Insightly.api_key = "test" # or whatever
I get this error:
NoMethodError: undefined method `api_key=' for Insightly:Module
I am having some issues fetching relationships. Nothing fancy here...
> Insightly2.client.get_relationships
NameError: uninitialized constant Insightly2::Resources::Relationship
from /usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/insightly2-0.1.6/lib/insightly2/dsl/relationships.rb:9:in `get_relationships'
We use raven-ruby for all our logging needs which is based on message
instead of response
to display error messages.
I would appreciate a method alias to message
, i assume this is also useful for other libraries that parse error messages.
There's no way to add an email address to a contact as far as I can see. Is this by design or what? Or are we missing an example here.
Hello.
How would I go about calling this function: https://api.insight.ly/v2.1/Help/Api/GET-Opportunities-c_id-StateHistory
What I like to do is get state history pr. oppertunity.
Hi, can you provide hello world code? The link to the API isn't very useful. Thanks for any help.
We will be releasing version 2.2 of the Insightly API to beta during the week of September 21st. Watch the Q&A forum at support.insight.ly for an announcement there.
Going forward, we will be providing in house support for Python, .Net and Java. Support for additional languages will be provided by customers. We also implemented swagger.io, which can auto-generate SDKs for most programming languages.
Thanks for using Insightly. Stay tuned for more information.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.