{"_id":"@adapt-retail/banner-data","_rev":"6-e2f41b25bb002c715038ebb04aa06a7b","name":"@adapt-retail/banner-data","description":"Api for retreaving Adapt Retail information to banners.","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.1":{"name":"@adapt-retail/banner-data","version":"0.0.1","description":"Api for retreaving Adapt Retail information to banners.","main":"dist/index.js","scripts":{"test":"ava","tdd":"executor 'npm run build && npm run test' --watch='src/*.js' --watch='test/*.js'","build":"babel src -d dist"},"repository":{"type":"git","url":"git+https://github.com/adaptretail/banner-data.git"},"bugs":{"url":"https://github.com/adaptretail/banner-data/issues"},"keywords":[],"author":{"name":"Lasse S. Haslev"},"license":"ISC","devDependencies":{"@lassehaslev/executor":"^0.1.2","ava":"^0.21.0","babel-cli":"^6.24.1","babel-preset-env":"^1.6.0"},"dependencies":{"axios":"^0.16.2","extend":"^3.0.1"},"gitHead":"c83f934872ed2c252d39089a2c5ae84eb03328d3","homepage":"https://github.com/adaptretail/banner-data#readme","_id":"@adapt-retail/banner-data@0.0.1","_npmVersion":"5.3.0","_nodeVersion":"8.3.0","_npmUser":{"name":"lassehaslev","email":"lasse@haslev.no"},"dist":{"integrity":"sha512-gvT9OKL9lc++VFCyn9hrDJc/cOT4T7XlkphPcE+jA3ReuQsynjIl1s3vnvoQ03pCJEXs3gZ8+XC9bpjFDU5hKA==","shasum":"05cbaabf495912cd4a3d77d44eb5ec1886a0b3cb","tarball":"https://registry.npmjs.org/@adapt-retail/banner-data/-/banner-data-0.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJvGwiJQ4pQp0pho8zlma4elVsLs9mCUzr7iTxioq+7gIgbxq8ANkc+KaYqwltt+4Meoa7wwDDhdI7q8Yz8zJZtHc="}]},"maintainers":[{"name":"lassehaslev","email":"lasse@haslev.no"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/banner-data-0.0.1.tgz_1504344611903_0.23189461790025234"},"directories":{}},"0.0.2":{"name":"@adapt-retail/banner-data","version":"0.0.2","description":"Api for retreaving Adapt Retail information to banners.","main":"dist/index.js","scripts":{"test":"ava","tdd":"executor 'npm run build && npm run test' --watch='src/*.js' --watch='test/*.js'","build":"babel src -d dist","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/adaptretail/banner-data.git"},"bugs":{"url":"https://github.com/adaptretail/banner-data/issues"},"keywords":[],"author":{"name":"Lasse S. Haslev"},"license":"ISC","devDependencies":{"@lassehaslev/executor":"^0.1.2","ava":"^0.21.0","babel-cli":"^6.24.1","babel-preset-env":"^1.6.0"},"dependencies":{"axios":"^0.16.2","extend":"^3.0.1"},"gitHead":"9670fee06e5aad13f3ab77b55abd494bd4d7504b","homepage":"https://github.com/adaptretail/banner-data#readme","_id":"@adapt-retail/banner-data@0.0.2","_npmVersion":"5.3.0","_nodeVersion":"8.3.0","_npmUser":{"name":"lassehaslev","email":"lasse@haslev.no"},"dist":{"integrity":"sha512-KA5ybJVuG9MZzFFHswihg/8IGTqCner0HOWCxXybvgMHceVLEsq90SqSmwrIx03S7nWWa/OMhn65ev/8brzGsA==","shasum":"67a94476a0eab78d1deefb5d0d642448a7fa6737","tarball":"https://registry.npmjs.org/@adapt-retail/banner-data/-/banner-data-0.0.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEr01Gf5wlB2qD8f5PFX6hE5eWGLpkEk6gm97aznOwQSAiEAvhz2JkYSPNi1KMDecOk5LgoSLHIdbJ8o6QyZVVtXCqI="}]},"maintainers":[{"email":"lasse@haslev.no","name":"lassehaslev"},{"email":"lasse.haslev@kodient.com","name":"adapt-retail-owner"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/banner-data-0.0.2.tgz_1504344757559_0.7891218035947531"},"directories":{}},"0.1.0":{"name":"@adapt-retail/banner-data","version":"0.1.0","description":"Api for retreaving Adapt Retail information to banners.","main":"dist/index.js","scripts":{"test":"ava","tdd":"executor 'npm run build && npm run test' --watch='**/*.js' --ignore='dist/' --ignore='node_modules/'","build":"babel src -d dist","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/adaptretail/banner-data.git"},"bugs":{"url":"https://github.com/adaptretail/banner-data/issues"},"keywords":[],"author":{"name":"Lasse S. Haslev"},"license":"ISC","devDependencies":{"@lassehaslev/executor":"^0.1.2","ava":"^0.21.0","babel-cli":"^6.24.1","babel-preset-env":"^1.6.0"},"dependencies":{"axios":"^0.16.2","extend":"^3.0.1"},"gitHead":"f9758c35d19081f58a621e3e53e2b8be678852ed","homepage":"https://github.com/adaptretail/banner-data#readme","_id":"@adapt-retail/banner-data@0.1.0","_npmVersion":"5.4.1","_nodeVersion":"8.3.0","_npmUser":{"name":"lassehaslev","email":"lasse@haslev.no"},"dist":{"integrity":"sha512-e5xdZe77pu1PpvWXI1W0NalkUp2EQLc9STWrseg/+iFez5AmJdFi/zqjzC6nRDTqV+gUs5bsI3KImi+ie/cLbA==","shasum":"db5d846b9a7b6358313ba7703dbfaeb9d5faf7f1","tarball":"https://registry.npmjs.org/@adapt-retail/banner-data/-/banner-data-0.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEjLyB2XI57cIn9E8Yz2yAgcSXjasvCIGxoj6mJO0kmQIgedomGAeAkZOc5/8tgzjvrQu94S1qbHjFiqYQlP1lODI="}]},"maintainers":[{"email":"lasse@haslev.no","name":"lassehaslev"},{"email":"lasse.haslev@kodient.com","name":"adapt-retail-owner"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/banner-data-0.1.0.tgz_1507790991451_0.2464495764579624"},"directories":{}},"0.2.0":{"name":"@adapt-retail/banner-data","version":"0.2.0","description":"Api for retreaving Adapt Retail information to banners.","main":"dist/index.js","scripts":{"test":"ava","tdd":"executor 'npm run build && npm run test' --watch='**/*.js' --ignore='dist/' --ignore='node_modules/'","build":"babel src -d dist","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/adaptretail/banner-data.git"},"bugs":{"url":"https://github.com/adaptretail/banner-data/issues"},"keywords":[],"author":{"name":"Lasse S. Haslev"},"license":"ISC","devDependencies":{"@lassehaslev/executor":"^0.1.2","ava":"^0.21.0","babel-cli":"^6.24.1","babel-preset-env":"^1.6.0"},"dependencies":{"axios":"^0.16.2","extend":"^3.0.1"},"gitHead":"f0a5e020224cc4f01bd5229b21a66430b9482ca3","homepage":"https://github.com/adaptretail/banner-data#readme","_id":"@adapt-retail/banner-data@0.2.0","_npmVersion":"5.6.0","_nodeVersion":"8.3.0","_npmUser":{"name":"lassehaslev","email":"lasse@haslev.no"},"dist":{"integrity":"sha512-TKnaIykqHptx3Tx+RIJ/A0OusJxzrw5LyOJwsKhS3sSE41kEF5pOifNu8YKoLpnvR00wahfNvtecW617rqllEQ==","shasum":"fbaf348258bd57bd5f92ba25e85123836c4af1ca","tarball":"https://registry.npmjs.org/@adapt-retail/banner-data/-/banner-data-0.2.0.tgz","fileCount":8,"unpackedSize":11495,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDrp4rhe0PImkIrAQa2/wDEYE/cz0xCzusUCGncG07vEAiBwHJO76zTHsMZJIf3v9oZ4BlxdhdmOsBh62WJo/nNCEA=="}]},"maintainers":[{"email":"lasse.haslev@kodient.com","name":"adapt-retail-owner"},{"email":"lasse@haslev.no","name":"lassehaslev"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/banner-data_0.2.0_1518695035137_0.3017280231915158"},"_hasShrinkwrap":false}},"readme":"# @adapt-retail/banner-data (alpha)\n\n> JavaScript api for communicating with Adapt retail `api`.\n\n> 🚧🚧 Warning: This project is in alpha stage. Use with caution. 🚧🚧\n\n## Install\n\n### NPM\n```bash\nnpm install @adapt-retail/banner-data\n```\n\n### YARN\n```bash\nyarn add @adapt-retail/banner-data\n```\n\n## API\n\n### Create object\n\nProvide the adapt data when creating the AdaptData.\n\n> Note: When creating your first Adapt `Banner` or `InstoreTV`\n> We recommend that you use a `collection` production instead of a `Banner` or `InstoreTV` production.\n> This is because you cannot generate preview of a `Banner` or `InstoreTV` production that do not have template assign to it.\n> And usually you do not have that when creating your `Adapt Template`.\n\n```js\n// Import Adapt Data\nimport AdaptData from '@adapt-retail/banner-data';\n\n// Create instance\nvar adapt = new AdaptData({\n    account: 'priceco58c12436f20b4', // Account key\n    project: 1, // Project ID\n    campaign: 1, // Campaign ID\n    production: 1, // Production ID\n    source: null, // optional \n    preview: false, // optional\n});\n```\n\n#### Live vs Preview\nSetting preview `preview: true` will use the slower but faster reloading of data.\nFor live sites, make sure to use the `preview: false` to use our fast CDN with cache reload in 5 minutes.\n\n#### Set custom datasource\n\nSetting the source property of the Adapt data will overwrite any data requested by api.\nThis is nice for developing when you are offline.\n```js\nvar adapt = new AdaptData({\n    source: {\n        data: [\n            {\n                id: 1234,\n                name: 'Product',\n                price: 199\n            }\n        ]\n    } \n});\n```\n\n### Start\n\nAfter setting up the object, you can call `.start` to start retrieving the content.\n\n```js\nvar adapt = new AdaptData({ ... });\n\n// Via promise\nadapt.start().then( function( adapt_data ) {\n    ... Adapt data is loaded and ready ...\n} );\n\n// Via function parameter\nadapt.start( function( adapt_data ) {\n    ... Adapt data is loaded and ready ...\n} );\n```\n\n### Asset\n\nGet the asset in the adapt folder.\n\n```js\nadapt.start( function( adapt_data ) {\n    adapt.asset( 'my-image.png' );\n} );\n```\n\n## LightAdaptData\n\nLight adapt data is a super light version for adapt data.\nIt cannot request data from external source, but it can read `source`.\n\n> This class is meant for [Adapt banner productions](https://adaptretail.com).\n\nWhen using webpack you can set this setting when running production script.\n```js\nif (process.env.NODE_ENV === 'production') {\n  module.exports.resolve = {\n      alias: {\n        '@adapt-retail/banner-data': '@adapt-retail/banner-data/dist/LightAdaptData.js',\n      }\n  };\n}\n```\n","maintainers":[{"email":"lasse.haslev@kodient.com","name":"adapt-retail-owner"},{"email":"lasse@haslev.no","name":"lassehaslev"}],"time":{"modified":"2022-04-04T11:25:48.917Z","created":"2017-09-02T09:30:12.986Z","0.0.1":"2017-09-02T09:30:12.986Z","0.0.2":"2017-09-02T09:32:38.502Z","0.1.0":"2017-10-12T06:49:52.336Z","0.2.0":"2018-02-15T11:43:55.780Z"},"homepage":"https://github.com/adaptretail/banner-data#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/adaptretail/banner-data.git"},"author":{"name":"Lasse S. Haslev"},"bugs":{"url":"https://github.com/adaptretail/banner-data/issues"},"license":"ISC","readmeFilename":"README.md"}