Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
This is a rest client library to handle talking to http://Insight.ly
The official API for Insigh.ly was released on August 12, 2012. This library is in the very early stages of implementing access to everything expose in that API. The focus is primarily on opportunities and tasks.
You have to be a paying customer of Insight.ly to use the API. If you are on a free plan, then it will give you 401 errors when you try to do anything with the API
Besides including the gem you need to use the Configuration class to set your API key.
Insightly::Configuration.api_key = "XXX-XXX-XXX-XXXX"
This key is provided to you in your User Settings section of Insight.ly.
Some of the resources allow you to have custom fields. They are returned as number fields (c.f. OPPORTUNITY_FIELD_1). You can call them directly in your code by that name.
opportunity = Insightly::Opportunity.new(1000)
opportunity.opportunity_field_1 = "Ron Campbell"
To make your code more readable, you can add in labels for those fields so you can refer to them more readable. The fields are lined up based on the order they are provided to the setting. For example, Opportunities support 10 custom fields. You can provide up to 10 labels to match all 10 fields. You can set this up in the same place you set your API key.
Insightly::Configuration.custom_fields_for_opportunities(:person_who_referred_them, :where_they_saw_the_ad)
opportunity = Insightly::Opportunity.new(1000)
opportunity.opportunity_field_1 = "Ron Campbell"
opportunity.person_who_referred_them == "Ron Campbell"
The API allows you to change the state of an opportunity directly by modifying the OPPORTUNITY_STATE field. This doesn't store the reason that the opportunity state was changed. In order to store the reason, you have to PUT to OpportunityStateChange with a valid OpportunityStateReason. OpportunityStateReasons can only be created manually in the web interface and then referred to via the API.
This is important if you want to have it show you the state changes in the Opportunity details. Direct modifications don't create a log entry. Whereas the log entry is created if you do create them. In order for your code to work, you need to make sure you have valid Opportunity State Reasons for all the states.
We default to creating two for open - "Created by API", and "Reopened by API". This allows us to set those as reasons if they exist.
The documentation for Insight.ly the mixes the use of Organization and Organisation. Insight.ly spells it Organisation in urls and in the API - so we only use that spelling in the library.
Insight.ly supports both custom fields (up to 10 on Opportunities, Organisations, and Contacts). Opportunities, Organisations, Contacts also support tags. What is the difference? Custom fields allow you to put data on the item. This data shows up when you look at the details page of that record. Tags show up in the summary list, and also allow you to search/sort by.
FAQs
Unknown package
We found that insightly demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.