{"_id":"365farmnet","_rev":"5-85e7ad3944523d1be3ec3978a18fc01e","name":"365farmnet","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"365farmnet","version":"0.0.1","keywords":["365farmnet","api","connect","Agriculture"],"author":{"name":"Christoph Pahmeyer","email":"christoph.pahmeyer@uni-bonn.de"},"license":"MIT","_id":"365farmnet@0.0.1","maintainers":[{"name":"chrispahm","email":"christoph.pahmeyer@ilr.uni-bonn.de"}],"homepage":"https://github.com/fruchtfolge/365FarmNet#readme","bugs":{"url":"https://github.com/fruchtfolge/365FarmNet/issues"},"dist":{"shasum":"9bbd7c582e5f138a03316768d71db900cc28233a","tarball":"https://registry.npmjs.org/365farmnet/-/365farmnet-0.0.1.tgz","fileCount":10,"integrity":"sha512-5vMaNPIh7w5faNTfN7eaMFWtN5R1E8AW6hP6kN4w1hVz0yAG9V6uPA5wEJNN5PH+q/cOt0Xw3ywgfInOs0hC5w==","signatures":[{"sig":"MEQCIFIFxCYA8zPUCm6Bf6p1d2mrFxoyp3MNResPOnBmA2cXAiB8NZVIKQTrvOTNvaDpPDE0bqx50bvt66PGAV2DlRG68w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsJ8JCRA9TVsSAnZWagAAx1sQAJyr7mbHkMa/FBhYmUGU\ntM4FD0pVRXAo9zs5qJgxO9atoVnLQHOv9JgNCNFzETxsP4aI+sQkv67zeaAn\nCwSMO4F5a4DhKWQU0TXz4FVZGTo2z2FV4C+I1vD7SXRIubmNO0CAJekwU58W\nWIX8XorMk3z05EOIwiGYYCKlIbXRPymxwLPjiVNmOnXuBA1COva2FSzPzWCb\nTWSlCUst1EeRxdkSRrFGpIHyNWpR/s6wfLnTzn1kep9hoge2uHS3vw7TtcB4\nynFeuLPp/jd/cHavB+Egk5U8NM+4Uefr7bezWJq0QsqzbIJiSKhw10tuC+Mh\nT+3ByCJXoO2BcGS4JSk+EUeZjVFnwvo055clLeXGLL0oX9ijhvXyzCjfcgWw\nXutpORzWalu4d3Qz1bCgRjFlg1BIHXhC/y4osYgXziHqJhyMax+IPGazhYRq\noua7TNEnjgOtpoDJtCKE2qGqpBdhRuAENUXcVF5/G4JOFaKXYSHN8pnUOaCI\nRLuTyf2IoRFpNO6I2mRyFAs9mOgqrWnlnwsJSC0cuBGsS4WJZNqbzEq903gc\nplaqq4/MgHw9fO7oPtA1zbxQS5vnfXi6G7jSqKusUHRc/x4DQ4LeSTOEWOgt\nMiNWEcEtJwoa8LHhBp60dXqqefQ08p7sY04r1/gXWGTUSqhXzuT4QiStacsf\n3YLh\r\n=WckI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"4b040232fc8fe45f76fa223e76cb158a29297c72","scripts":{"test":"node test/test.js"},"_npmUser":{"name":"chrispahm","email":"christoph.pahmeyer@ilr.uni-bonn.de"},"repository":{"url":"git+https://github.com/fruchtfolge/365FarmNet.git","type":"git"},"_npmVersion":"6.4.1","description":"Node.js client for the 365FarmNet Connect REST API","directories":{},"_nodeVersion":"10.10.0","dependencies":{"axios":"^0.18.0","jsonwebtoken":"^8.5.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^5.16.0","prettier":"1.16.4","eslint-config-prettier":"^4.1.0","eslint-plugin-prettier":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/365farmnet_0.0.1_1555078920882_0.31130694274353465","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"365farmnet","version":"0.0.2","keywords":["365farmnet","api","connect","Agriculture"],"author":{"name":"Christoph Pahmeyer","email":"christoph.pahmeyer@uni-bonn.de"},"license":"MIT","_id":"365farmnet@0.0.2","maintainers":[{"name":"chrispahm","email":"christoph.pahmeyer@ilr.uni-bonn.de"}],"homepage":"https://github.com/fruchtfolge/365FarmNet#readme","bugs":{"url":"https://github.com/fruchtfolge/365FarmNet/issues"},"dist":{"shasum":"e632de1c43edab07ea8fde6dfcf5dec3e48270f7","tarball":"https://registry.npmjs.org/365farmnet/-/365farmnet-0.0.2.tgz","fileCount":10,"integrity":"sha512-haQs8dwJab6c+uyWde41FRlVDAbdZvuqQHjrigknH07YUp4q+P0ipjUuOS2wo60bX1Xr6jTu0Q6YlXEA7lpiWQ==","signatures":[{"sig":"MEQCIB+NIxyCVi5xGF2FqSh8rMaPSUWYR9/VtivVT4eWqKSwAiAa3l10UoY092Rxp1a46l573lu6OxQGCOCxi4J6ZAtkIA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10835,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsLs8CRA9TVsSAnZWagAAWYEP/A+c4CGAdxUdzsFPBp4I\nMU+Bix38j3/YqluQzftDxvrjSftIIalE9HekQ3h9//o1PzEhEF+ZYdzpu9ie\nwY3hCJ1pjJGgKjmPEDnRYAOxg03snfVNjvYbsfH6xsketdVXQSXiYHGLjz8v\naCK3y7tk2fpPXCtL/HxxE7KGJqvwMrIrCjHaOe7UhAxl4tDbPGEz7My4xC46\nd4cxAYQlbzTkMOL9F+tnHV1PByOJZ0xT0Wvevqcsb8rauDWSnYfgQEGwOe7M\nE8yMHxBuKDgP1eFn4NDILZnnmK0DxuUno313ZNe4iqEButHBd5bMQJt2j5wn\nfCw/exb5F12kNhaDTVXhkcsbEY0u3/oMJhEmyL04qIBLri9Xu+TRByUAtAkB\no6x3un3Wcul6sO5zGfObS0EU3kc9xzcywJG4SSUl7jXenA+fzmg6wG594QAW\nUTNmstj0doTAP7OagIddkjNvLx1BFNJnisxuczEn71SOMNycjf511C9NoUqa\nhpTedK6lo7HINIhB1668OeISFpPdEOlxZ3VRk947pjL8gde7RUUe1Te20WNs\nzpCEK++WWF7g2ugEfl642kWBdldtey5Qos/cIUTpy1tvyKieegP4FpOiCjgf\nDftnBmcKcH5RoWry6IIYWSRZwvF+GbVb2W2HFqJGl6y7fxm8p2eTClf/P4hp\ntFXA\r\n=CamB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"968cfb251bdbe132fa502b365a0525cdccf83e7c","scripts":{"test":"node test/test.js"},"_npmUser":{"name":"chrispahm","email":"christoph.pahmeyer@ilr.uni-bonn.de"},"repository":{"url":"git+https://github.com/fruchtfolge/365FarmNet.git","type":"git"},"_npmVersion":"6.4.1","description":"Node.js client for the 365FarmNet Connect REST API","directories":{},"_nodeVersion":"10.10.0","dependencies":{"axios":"^0.18.0","jsonwebtoken":"^8.5.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^5.16.0","prettier":"1.16.4","eslint-config-prettier":"^4.1.0","eslint-plugin-prettier":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/365farmnet_0.0.2_1555086139803_0.6155281009559286","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"365farmnet","version":"0.0.3","keywords":["365farmnet","api","connect","Agriculture"],"author":{"name":"Christoph Pahmeyer","email":"christoph.pahmeyer@uni-bonn.de"},"license":"MIT","_id":"365farmnet@0.0.3","maintainers":[{"name":"chrispahm","email":"christoph.pahmeyer@ilr.uni-bonn.de"}],"homepage":"https://github.com/fruchtfolge/365FarmNet#readme","bugs":{"url":"https://github.com/fruchtfolge/365FarmNet/issues"},"dist":{"shasum":"74f012931f2945bb6a2a217bc80153f2b1c589df","tarball":"https://registry.npmjs.org/365farmnet/-/365farmnet-0.0.3.tgz","fileCount":10,"integrity":"sha512-8tWSItbSrobBhge1t67z8bWOPgcqlSlbGPN00GjFpZtoz6YTcvjZ9FeSr7Vn/wbFNdqgcRB4eLGXhm8LTpyWoQ==","signatures":[{"sig":"MEYCIQC1t0LDCS/2dOFVYBQvXtF9z6va+P2SFpauKVKC+Z2vfgIhAK8/UyiWckoQI7UEcyymfZCQ1NehpzEogzfzrw6mDbGH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/PyXCRA9TVsSAnZWagAA3lMP/0m/90Wlphxy8frSIuJH\nYDuDUzx0wh+udaVnmFwEI4S1AOJirsKT/W6oIecfHwikLLFG3tscsq2Xvs3/\nF65NZ1yHa3vBh0PPNe9vDYFCjzvF8nolPyfeKwoGDw0EJ348phOvcyovXCqK\n0PDuelMu9b2u/MTkj0Lz+YxPtHC9NtDuCMC1Epp7ZeAGYP3mS093dineU68T\nVIS4mX1+obtUloCMJgMiWJt1YWDFmuKrLrcDRdbb0koo7PiLy88HHFsF2J7F\nXFvIHZEj2+nWrydsC9nDbuadokbDmjbecon93MnVKBiS0U+WheQeJNZL5U7O\nmQ0jFOy83hWrnk8yrF8T1/pAyt8pFuFOHDUpUI7K2W2woOEi0Z9g7K09JSlU\nfwm77XIpBobAjdtZHGyLkvetK/2DhQ8RMxWoXMb5AKxXzM0FeQRxTuRtMZ/N\n6HMDEr5LydApUSDF7Dk41kS3dCk3XgxH4cQ7kEaQxqz4FG1IG72qspFpZd4p\niI9h/6+N4+b2yDonPFzxPGbLPMaWfCOYo4JiSN6Fev7VtAT+zwuHm8CFQS48\n0dTKCMJ+TZ7x/QYW1qyqHuSN48h3/2aB4wBw/lGy9RUW4mWUnO27asVRxOho\nu/isQ7mPDpYGXZsxemGIZdOZFWHA/tFT7tAORh4GI4xA7DM+Ie6uDXclgAG6\nMgLV\r\n=FVKL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"7e3067ead6d3eec37448216a26f243c23d4418c0","scripts":{"test":"node test/test.js"},"_npmUser":{"name":"chrispahm","email":"christoph.pahmeyer@ilr.uni-bonn.de"},"repository":{"url":"git+https://github.com/fruchtfolge/365FarmNet.git","type":"git"},"_npmVersion":"6.13.4","description":"Node.js client for the 365FarmNet Connect REST API","directories":{},"_nodeVersion":"12.16.1","dependencies":{"axios":"^0.19.2","jsonwebtoken":"^8.5.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^7.3.1","express":"^4.17.1","prettier":"^2.0.5","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4"},"_npmOperationalInternal":{"tmp":"tmp/365farmnet_0.0.3_1593638038670_0.7224058471569064","host":"s3://npm-registry-packages"}}},"time":{"created":"2019-04-12T14:22:00.881Z","modified":"2026-02-05T11:58:29.717Z","0.0.1":"2019-04-12T14:22:01.078Z","0.0.2":"2019-04-12T16:22:19.935Z","0.0.3":"2020-07-01T21:13:58.788Z"},"bugs":{"url":"https://github.com/fruchtfolge/365FarmNet/issues"},"author":{"name":"Christoph Pahmeyer","email":"christoph.pahmeyer@uni-bonn.de"},"license":"MIT","homepage":"https://github.com/fruchtfolge/365FarmNet#readme","keywords":["365farmnet","api","connect","Agriculture"],"repository":{"url":"git+https://github.com/fruchtfolge/365FarmNet.git","type":"git"},"description":"Node.js client for the 365FarmNet Connect REST API","maintainers":[{"email":"christoph.pahmeyer@ilr.uni-bonn.de","name":"pahmeyer"}],"readme":"# 365FarmNet Connect - Node.js client\nA simple promise based client for the [365FarmNet Connect REST API](https://developer.365farmnet.com/).\n\n## Quick start\n```\nnpm install 365farmnet\n```\n**Note:** This library requires Node.js > v.10.0\n\nImport the library, and pass the partner ID and secret that you got from \nregistering at [https://devcon.365farmnet.com/](https://devcon.365farmnet.com/).\n\n```js\nconst farmnet = require('365farmnet')({\n  partnerId: 'yourPartnerId',\n  secret: 'yourPartnerSecret'\n})\n```\n\nMake requests to the 365FarmNet Connect REST API by calling the imported function \n(`farmnet` if you follow this example) in the following manner:\n\n```js\n// farmnettoken is the JWT that is passed to the iframe within the \n// 365FarmNet main application\nfarmnet('fields', {\n  token: farmnettoken,\n  params: {\n    includeGeometry: false,\n    includeSoilType: true\n  }\n}).then(data => {\n  // data will contain all fields of the farm\n}).catch(err => {\n  console.log(err)\n})\n\n```\n\n## API\nThe module exports a default function. \nIt takes two arguments:\n\n### `farmnet('endpoint', options)`\n| Name                                  | Description                                                                          |\n|:--------------------------------------|:-------------------------------------------------------------------------------------|\n| **endpoint** *string* *required*      | The REST API endpoint to call. See documentation for all available endpoints.        |\n| **options.token** *string* *required* | The `token` property of the `options object` needs to be a valid JWT `farmnettoken`. |\n| **options.params** *object*           | Optional query params for the API call.                                              |\n| **options.data** *object*             | Optional body params for the API call (for POST/PUT requests).                       |\n| **options.method** *string*           | Default: 'GET'. Can be any HTTP request method valid for the given endpoint.         |\n\n### Testing\nFork this repo, then put a `credentials.js` file in the root directory with the following content.\n\n```js\n// content of the credentials.js file, which needs to be placed at the root of this repo\nmodule.exports = {\n  partnerId: 'your_partner_id',\n  secret: 'your_secret'\n}\n```\n\nThen run \n```\nnpm test\n```\n\nThis will spin up an *Express.js* server on http://localhost:3000/.\n\nLogin to your account at https://devcon.365farmnet.com/, \nclick on the Developer tab -> Developer Playground.\nIf all tests pass, you should see `All test passed!`, if not, check your console 😄\n\n\n### Contribution\nPlease feel free to submit an issue or a pull request!\n\n### License\nMIT\n","readmeFilename":"README.md"}