{"_id":"@akeating-redhat/fh-js-sdk","_rev":"5-de76a2e71f11efbe1af4700ed29e7203","name":"@akeating-redhat/fh-js-sdk","description":"feedhenry js sdk","dist-tags":{"latest":"2.18.2"},"versions":{"2.18.0":{"name":"@akeating-redhat/fh-js-sdk","version":"2.18.0","description":"feedhenry js sdk","main":"dist/feedhenry.js","types":"./fh-js-sdk.d.ts","browser":{"JSON":"./libs/json2.js"},"browserify-shim":{"JSON":{"exports":"JSON"},"./libs/generated/lawnchair.js":{"exports":"Lawnchair"},"./libs/generated/crypto.js":{"exports":"CryptoJS"}},"browserify":{"standalone":"feedhenry","transform":["browserify-shim"]},"testling":{"harness":"mocha-bdd","scripts":["test/browser/libs/sinon/sinon.js","test/browser/libs/sinon/sinon-ie.js"],"files":"test/tests/*.js","browsers":["ie/9..10","firefox/5.0","firefox/latest","chrome/7.0","chrome/latest","safari/5.0.5","safari/latest","opera/11","opera/next","iphone/6.0","ipad/6.0","android-browser/latest"]},"scripts":{"test":"grunt test","prepublish":"grunt concat-core-sdk"},"repository":{"type":"git","url":"git://github.com/feedhenry/fh-js-sdk.git"},"author":"","license":"Copyright (c) 2014 FeedHenry Ltd, All Rights Reserved.","gitHead":"251a1f88a39f59f2652552ae245893a833faee71","dependencies":{"type-of":"~2.0.1","loglevel":"~0.6.0","underscore":"~1.6.0","process":"~0.6.0"},"devDependencies":{"async":"0.2.10","browserify":"3.46.1","browserify-shim":"3.3.2","chai":"1.9.0","express":"3.4.8","grunt":"0.4.2","grunt-browserify":"1.3.2","grunt-contrib-concat":"0.3.0","grunt-contrib-connect":"0.6.0","grunt-contrib-jshint":"0.8.0","grunt-contrib-qunit":"~0.4.0","grunt-contrib-uglify":"0.3.2","grunt-contrib-watch":"0.6.0","grunt-env":"0.4.1","grunt-mocha-phantomjs":"0.4.3","grunt-mocha-test":"0.9.4","grunt-shell":"0.6.4","grunt-text-replace":"0.3.12","grunt-zip":"0.12.0","mocha":"1.17.1","sinon":"1.9.0","sinon-chai":"2.5.0","through":"2.3.4"},"bugs":{"url":"https://github.com/feedhenry/fh-js-sdk/issues"},"homepage":"https://github.com/feedhenry/fh-js-sdk#readme","_id":"@akeating-redhat/fh-js-sdk@2.18.0","_shasum":"2fc1da0ef7db55bc89f2b448ce04103724c0a728","_from":".","_npmVersion":"2.15.8","_nodeVersion":"4.4.7","_npmUser":{"name":"akeating-redhat","email":"akeating@redhat.com"},"dist":{"shasum":"2fc1da0ef7db55bc89f2b448ce04103724c0a728","tarball":"https://registry.npmjs.org/@akeating-redhat/fh-js-sdk/-/fh-js-sdk-2.18.0.tgz","integrity":"sha512-nVZaK16/F92XnXRJSRFLAOjHUCtVUwRjExcYZdn0EA41pY/dzfTdVj2lsxba4SABZQ9GA2DTU1onYSCP9O5Thw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDhaHRpkkQfw0qhaak6RNmPy5YSLdAUWYjaVGvBsGMafAiB7UBSVeGTan7LRkq+bOSyPtMmW4um2SazuENY6R4ywXg=="}]},"maintainers":[{"name":"akeating-redhat","email":"akeating@redhat.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/fh-js-sdk-2.18.0.tgz_1480613029434_0.5200992226600647"}},"2.18.1":{"name":"@akeating-redhat/fh-js-sdk","version":"2.18.1","description":"feedhenry js sdk","main":"dist/feedhenry.js","types":"./fh-js-sdk.d.ts","browser":{"JSON":"./libs/json2.js"},"browserify-shim":{"JSON":{"exports":"JSON"},"./libs/generated/lawnchair.js":{"exports":"Lawnchair"},"./libs/generated/crypto.js":{"exports":"CryptoJS"}},"browserify":{"standalone":"feedhenry","transform":["browserify-shim"]},"testling":{"harness":"mocha-bdd","scripts":["test/browser/libs/sinon/sinon.js","test/browser/libs/sinon/sinon-ie.js"],"files":"test/tests/*.js","browsers":["ie/9..10","firefox/5.0","firefox/latest","chrome/7.0","chrome/latest","safari/5.0.5","safari/latest","opera/11","opera/next","iphone/6.0","ipad/6.0","android-browser/latest"]},"scripts":{"test":"grunt test","prepublish":"grunt concat-core-sdk"},"repository":{"type":"git","url":"git://github.com/feedhenry/fh-js-sdk.git"},"author":"","license":"Copyright (c) 2014 FeedHenry Ltd, All Rights Reserved.","gitHead":"251a1f88a39f59f2652552ae245893a833faee71","dependencies":{"type-of":"~2.0.1","loglevel":"~0.6.0","underscore":"~1.6.0","process":"~0.6.0"},"devDependencies":{"async":"0.2.10","browserify":"3.46.1","browserify-shim":"3.3.2","chai":"1.9.0","express":"3.4.8","grunt":"0.4.2","grunt-browserify":"1.3.2","grunt-contrib-concat":"0.3.0","grunt-contrib-connect":"0.6.0","grunt-contrib-jshint":"0.8.0","grunt-contrib-qunit":"~0.4.0","grunt-contrib-uglify":"0.3.2","grunt-contrib-watch":"0.6.0","grunt-env":"0.4.1","grunt-mocha-phantomjs":"0.4.3","grunt-mocha-test":"0.9.4","grunt-shell":"0.6.4","grunt-text-replace":"0.3.12","grunt-zip":"0.12.0","mocha":"1.17.1","sinon":"1.9.0","sinon-chai":"2.5.0","through":"2.3.4"},"bugs":{"url":"https://github.com/feedhenry/fh-js-sdk/issues"},"homepage":"https://github.com/feedhenry/fh-js-sdk#readme","_id":"@akeating-redhat/fh-js-sdk@2.18.1","_shasum":"54c71fc0226eefe4d8ce76386d2407f3366e8a9c","_from":".","_npmVersion":"2.15.8","_nodeVersion":"4.4.7","_npmUser":{"name":"akeating-redhat","email":"akeating@redhat.com"},"dist":{"shasum":"54c71fc0226eefe4d8ce76386d2407f3366e8a9c","tarball":"https://registry.npmjs.org/@akeating-redhat/fh-js-sdk/-/fh-js-sdk-2.18.1.tgz","integrity":"sha512-u++gUCR0d1qnhePShe+Hf8AGiiTvyj3uOfrsQ+ywA4r1f/4BTB14/36vuoifFVZB31CWBm8nMjqEy4ZL/dkktg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGtKuKoY8t6Pm3y5CkJTwyZpN38iheNGw94NWAywEzbkAiAktx3rY4i/wb2gQMzWte9Y9+bFiBSRaMSURUDh8pbguw=="}]},"maintainers":[{"name":"akeating-redhat","email":"akeating@redhat.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/fh-js-sdk-2.18.1.tgz_1480686149610_0.3414684124290943"}},"2.18.2":{"name":"@akeating-redhat/fh-js-sdk","version":"2.18.2","description":"feedhenry js sdk","main":"dist/feedhenry.js","types":"./fh-js-sdk.d.ts","browser":{"JSON":"./libs/json2.js"},"browserify-shim":{"JSON":{"exports":"JSON"},"./libs/generated/lawnchair.js":{"exports":"Lawnchair"},"./libs/generated/crypto.js":{"exports":"CryptoJS"}},"browserify":{"standalone":"feedhenry","transform":["browserify-shim"]},"testling":{"harness":"mocha-bdd","scripts":["test/browser/libs/sinon/sinon.js","test/browser/libs/sinon/sinon-ie.js"],"files":"test/tests/*.js","browsers":["ie/9..10","firefox/5.0","firefox/latest","chrome/7.0","chrome/latest","safari/5.0.5","safari/latest","opera/11","opera/next","iphone/6.0","ipad/6.0","android-browser/latest"]},"scripts":{"test":"grunt test","prepublish":"grunt concat-core-sdk"},"repository":{"type":"git","url":"git://github.com/feedhenry/fh-js-sdk.git"},"author":"","license":"Copyright (c) 2014 FeedHenry Ltd, All Rights Reserved.","gitHead":"251a1f88a39f59f2652552ae245893a833faee71","dependencies":{"type-of":"~2.0.1","loglevel":"~0.6.0","underscore":"~1.6.0","process":"~0.6.0"},"devDependencies":{"async":"0.2.10","browserify":"3.46.1","browserify-shim":"3.3.2","chai":"1.9.0","express":"3.4.8","grunt":"0.4.2","grunt-browserify":"1.3.2","grunt-contrib-concat":"0.3.0","grunt-contrib-connect":"0.6.0","grunt-contrib-jshint":"0.8.0","grunt-contrib-qunit":"~0.4.0","grunt-contrib-uglify":"0.3.2","grunt-contrib-watch":"0.6.0","grunt-env":"0.4.1","grunt-mocha-phantomjs":"0.4.3","grunt-mocha-test":"0.9.4","grunt-shell":"0.6.4","grunt-text-replace":"0.3.12","grunt-zip":"0.12.0","mocha":"1.17.1","sinon":"1.9.0","sinon-chai":"2.5.0","through":"2.3.4"},"bugs":{"url":"https://github.com/feedhenry/fh-js-sdk/issues"},"homepage":"https://github.com/feedhenry/fh-js-sdk#readme","_id":"@akeating-redhat/fh-js-sdk@2.18.2","_shasum":"158b185fe1b01e1fa0b635f763b71454d669a1d3","_from":".","_npmVersion":"2.15.8","_nodeVersion":"4.4.7","_npmUser":{"name":"akeating-redhat","email":"akeating@redhat.com"},"dist":{"shasum":"158b185fe1b01e1fa0b635f763b71454d669a1d3","tarball":"https://registry.npmjs.org/@akeating-redhat/fh-js-sdk/-/fh-js-sdk-2.18.2.tgz","integrity":"sha512-Z1zXdn0aYdZ9Q6d9FTd/R+bGQebYwjZbaP1LmR0QSFRA013W9wPH8bGv1e2vTR7KULsBNNf9sEmXNLzBpcGquQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqvT/Twm6mDLSRNLSbyEWb9bHAegEdtLXlIm0DxgIl7AIgas4e/+ZMYvm+ARxUnEPBhigf41/McQAGqe8vNQLrGBQ="}]},"maintainers":[{"name":"akeating-redhat","email":"akeating@redhat.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/fh-js-sdk-2.18.2.tgz_1481127441349_0.04392825369723141"}}},"readme":"FeedHenry JavaScript SDK\n========================\n[![Build Status](https://travis-ci.org/feedhenry/fh-js-sdk.svg?branch=use-travis-ci)](https://travis-ci.org/feedhenry/fh-js-sdk)\n\nThe JavaScript SDK allows developers to integrate the FeedHenry Cloud into any web-based solution - desktop websites, mobile websites or a stand-alone JavaScript client.\n\nThe API is provided in the $fh namespace and uses a common convention for most functions, which takes the format:\n\n    $fh.doSomething(parameterObject, successFunction, failureFunction)\n\nWhere parameterObject is an ordinary JavaScript object. The successFunction callback is called if the operation was successful and the failureFunction callback is called if the operation fails. All of these arguments are optional. If there is only one function, it is taken as the success function.\n\nThe successFunction callback is called with one argument, a result object, which is again an ordinary JavaScript object. The failureFunction callback is called with two arguments: an error code string, and an object containing additional error properties (if any).\n\nDetailed documentation for the JavaScript SDK's API can be found here: http://docs.feedhenry.com/v3/api/app_api\n\n## Using with Titanium Applications\nThe FeedHenry Javascript SDK is built to work with Titanium applications. To get started, you need to first include the FeedHenry JS SDK, `feedhenry.js` in your Resources folder, at the root level. You also need to include a `fhconfig.js` file, which sets configuration properties for initializing the JS SDK. This file is a little different than normal, it should take the format of:\n\n    module.exports = {\n     \"appid\":\"yourAppIdHere\",\n     \"appkey\":\"yourAppKeyHere\",\n     \"connectiontag\":\"yourConnectionTagHere\",\n     \"host\":\"https://YourHost.feedhenry.com\",\n     \"projectid\":\"yourProjectIdHere\"\n    };\n\nYou can then require the FeedHenry SDK from any JavaScript file in your Titanium project, and use it as normal:\n\n  \tvar $fh = require('feedhenry');\n  \t$fh.act // ...FeedHenry Calls are now possible\n\nFor a practical exampe, see the [FeedHenry Titanium example app](https://github.com/feedhenry-training/fh-titanium-example).\n\n\n## Building\n\nThe JS SDK is now built using [Browserify](http://browserify.org/).\n\n### Development\n\nBecause of Browserify, you can write any new functions as normal node modules, and use node's \"require\" to load any other modules, or to be consumed by other modules.\n\n### Testing\n\nWrite your tests in test/tests directory. Add the tests to test/browser/suite.js file and run\n\n```\ngrunt test\n```\n\nThis will use mocha and phatomjs to run the tests.\n\nIn fact, if your module and test don't require a browser environment, you can just run them purely in node. (You may need to add a new grunt task to run them).\n\nTo help debugging, you can run\n\n```\ngrunt local\n```\n\nThis will start mock servers locally and you can go to http://localhost:8200/example/index.html page to debug. You may want to run\n\n```\ngrunt watch\n```\n\nIn another terminal window to auto generate the combined js sdk file.\n\n### Testling\n\nFor browser compatibility testing, we use [Testling](https://ci.testling.com/). The project page is here: https://ci.testling.com/feedhenry/fh-js-sdk.\n\nYou can also run testling locally:\n\n```\nnpm install -g testling\ntestling\n```\n\nIf testling can not find any browser locally, you either need to add browser paths to your PATH environment variable, or use\n\n```\ntestling -u\n```\nand copy the url to a browser.\n\n### Build\n\nWhen finish developing and testing, run\n\n```\ngrunt\n```\nTo generate the release builds.\n\n### Updating the AppForms Template App\n\nThis process should be changed, however, documenting it here.\n\nBuild the js-sdk as above.\nclone the AppForms-Template repo\n\n```\ngit clone git@github.com:feedhenry/AppForms-Template.git\n```\n\nswitch to the feedhenry3 branch\n\n```\ngit checkout feedhenry3\n```\n\ncopy the appForms-backbone file generated in the js-sdk to the AppForms-Template\n\n```\ncp fh-js-sdk/dist/appForms-backbone.js AppForms-Template/client/default/lib/appform-backbone.js\n```\n\ninstall the node modules in the AppForms-Template\n\n```\ncd AppForms-Template\nnpm install\n```\n\nand run grunt\n\n```\ngrunt\n```\n\nclone the app forms-project-client template app\n\n```\ngit clone git://github.com/feedhenry/appforms-project-client.git\n```\n\ncopy the resulting lib.min.js to the appforms template\n\n```\ncp AppForms-Template/dist/client/default/lib.min.js appforms-project-client/www/lib.min.js\n```\n\npush the updated changes\n\n```\ngit push origin master\n```\n\n## Releasing\n\nOur SDK is release on [npmjs](https://www.npmjs.com/package/fh-js-sdk). To do a release follow those steps:\n\n### Prepare release\n* Update ```package.json```, ```npm-shrinkwrap.json```, ``` ``` file with the new version number.\n* Update ```CHANGELOG.md``` with some JIRA link\n* Do a PR, make sure Travis build passed. Merge.\n* Tag the repository with the new version number:\n\n```\ngit tag -s -a {VERSION} -m 'version {VERSION}'   // e.g. {VERSION} format is  '2.17.0'\n```\n\n* Push the new release tag on GitHub:\n\n```\ngit push origin {TAG}\n```\n\n* [Travis build](.travis.yml#L12-L18) will generate a relase for you in release tab.\n\n### Publish to npmjs\n* Login to npm as `feedhenry` or make sure your own login is part of the collaborator list in [fh-js-sdk in npmjs.org](https://www.npmjs.com/package/fh-js-sdk)\n\n```\nnpm login\n```\n\n* Publish:\n\n```\nnpm publish\n```","maintainers":[{"name":"akeating-redhat","email":"akeating@redhat.com"}],"time":{"modified":"2022-06-12T14:26:56.574Z","created":"2016-12-01T17:23:50.114Z","2.18.0":"2016-12-01T17:23:50.114Z","2.18.1":"2016-12-02T13:42:32.380Z","2.18.2":"2016-12-07T16:17:24.174Z"},"homepage":"https://github.com/feedhenry/fh-js-sdk#readme","repository":{"type":"git","url":"git://github.com/feedhenry/fh-js-sdk.git"},"bugs":{"url":"https://github.com/feedhenry/fh-js-sdk/issues"},"license":"Copyright (c) 2014 FeedHenry Ltd, All Rights Reserved.","readmeFilename":"README.md"}