Security News
UK Officials Consider Banning Ransomware Payments from Public Entities
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
A simple promise based client for the 365FarmNet Connect REST API.
npm install 365farmnet
Note: This library requires Node.js > v.10.0
Import the library, and pass the partner ID and secret that you got from registering at https://devcon.365farmnet.com/.
const farmnet = require('365farmnet')({
partnerId: 'yourPartnerId',
secret: 'yourPartnerSecret'
})
Make requests to the 365FarmNet Connect REST API by calling the imported function
(farmnet
if you follow this example) in the following manner:
// farmnettoken is the JWT that is passed to the iframe within the
// 365FarmNet main application
farmnet('fields', {
token: farmnettoken,
params: {
includeGeometry: false,
includeSoilType: true
}
}).then(data => {
// data will contain all fields of the farm
}).catch(err => {
console.log(err)
})
The module exports a default function. It takes two arguments:
farmnet('endpoint', options)
Name | Description |
---|---|
endpoint string required | The REST API endpoint to call. See documentation for all available endpoints. |
options.token string required | The token property of the options object needs to be a valid JWT farmnettoken . |
options.params object | Optional query params for the API call. |
options.data object | Optional body params for the API call (for POST/PUT requests). |
options.method string | Default: 'GET'. Can be any HTTP request method valid for the given endpoint. |
Fork this repo, then put a credentials.js
file in the root directory with the following content.
// content of the credentials.js file, which needs to be placed at the root of this repo
module.exports = {
partnerId: 'your_partner_id',
secret: 'your_secret'
}
Then run
npm test
This will spin up an Express.js server on http://localhost:3000/.
Login to your account at https://devcon.365farmnet.com/,
click on the Developer tab -> Developer Playground.
If all tests pass, you should see All test passed!
, if not, check your console 😄
Please feel free to submit an issue or a pull request!
MIT
FAQs
Node.js client for the 365FarmNet Connect REST API
The npm package 365farmnet receives a total of 7 weekly downloads. As such, 365farmnet popularity was classified as not popular.
We found that 365farmnet demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.