{"id":21010593,"url":"https://github.com/geoffdutton/iterable-api","last_synced_at":"2025-05-15T02:34:29.589Z","repository":{"id":34297650,"uuid":"175476078","full_name":"geoffdutton/iterable-api","owner":"geoffdutton","description":"NodeJS library to interact with the iterable.com API.","archived":false,"fork":false,"pushed_at":"2024-09-06T09:56:03.000Z","size":1599,"stargazers_count":7,"open_issues_count":14,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-09T10:49:06.400Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geoffdutton.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-13T18:20:52.000Z","updated_at":"2023-09-18T20:25:35.000Z","dependencies_parsed_at":"2023-02-10T14:30:37.095Z","dependency_job_id":"dce32cb4-303c-4eae-9d12-d4f75991477d","html_url":"https://github.com/geoffdutton/iterable-api","commit_stats":{"total_commits":135,"total_committers":12,"mean_commits":11.25,"dds":0.5777777777777777,"last_synced_commit":"a0de5a74fd80393aea4789c509425ce0183bdea6"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoffdutton%2Fiterable-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoffdutton%2Fiterable-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoffdutton%2Fiterable-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoffdutton%2Fiterable-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geoffdutton","download_url":"https://codeload.github.com/geoffdutton/iterable-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225325101,"owners_count":17456659,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T09:21:34.869Z","updated_at":"2024-11-19T09:21:35.339Z","avatar_url":"https://github.com/geoffdutton.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node Iterable API\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n[![Node CI](https://github.com/geoffdutton/iterable-api/actions/workflows/nodejs.yml/badge.svg)](https://github.com/geoffdutton/iterable-api/actions/workflows/nodejs.yml)\n[![Coverage Status](https://coveralls.io/repos/github/geoffdutton/iterable-api/badge.svg?branch=master)](https://coveralls.io/github/geoffdutton/iterable-api?branch=master)\n[![npm version](https://badge.fury.io/js/node-iterable-api.svg)](https://badge.fury.io/js/node-iterable-api)\n[![Known Vulnerabilities](https://snyk.io/test/github/geoffdutton/iterable-api/badge.svg)](https://snyk.io/test/github/geoffdutton/iterable-api)\n\nCredit: [seanmcgary/iterable](https://github.com/seanmcgary/iterable)\n\n### Install\n\n```\nnpm install node-iterable-api\n```\n\n### Example\n\n```javascript\nconst client = require('node-iterable-api').create('\u003citerable api key\u003e')\n\nreturn client.lists.get()\n  .then(res =\u003e {\n    console.log(res.lists)\n  })\n  .catch(err =\u003e {\n    console.log(err)\n  })\n```\n\n### Resources\n\nAll resources are taken from those available in the [Iterable API documentation](https://app.iterable.com/api/docs).\n\n**Note**: Not all resources are implemented yet. You can see which ones in `lib/api.js`.\n\nResources are addressable by calling:\n\n```javascript\n// If param is a string, it'll append it to the resource path\n// Otherwise you can just past an object that will either be\n// passed to the body on a POST/PUT request, or as query\n// string params in the case of a GET request\niterableInstance[\u003cresource name\u003e][\u003cresource action\u003e](param[, payload])\n\n// e.g. to get lists:\niterableInstace.lists.get()\n  .then(data =\u003e {\n\t// data response\n  })\n\n// e.g. bulk update users\niterableInstace.users.bulkUpdate({\n\tusers: [\n        {\n            email: 'foo@bar.com',\n            dataFields: {\n                // some data fields\n            },\n            userId: \"someUserId\"\n        }\n\t]\n})\n```\n\nCurrently implemented resources are as follows:\n\n```\nlists\n  GET    - /lists\n  POST   - /lists\n  DELETE - /lists\n  GET    - /lists/getUsers\n  POST   - /lists/subscribe\n  POST   - /lists/unsubscribe\nevents\n  GET    - /events\n  POST   - /events/track\n  POST   - /events/trackBulk\n  POST   - /events/trackInAppOpen\n  POST   - /events/trackInAppClick\n  POST   - /events/trackWebPushClick\n  POST   - /events/trackPushOpen\nusers\n  GET    - /users\n  DELETE - /users\n  POST   - /users/update\n  POST   - /users/updateEmail\n  POST   - /users/bulkUpdate\n  POST   - /users/registerDeviceToken\n  POST   - /users/updateSubscriptions\n  POST   - /users/bulkUpdateSubscriptions\n  GET    - /users/getFields\n  GET    - /users/getSentMessages\n  POST   - /users/disableDevice\ninApp\n  GET    - /inApp/getMessages\npush\n  POST   - /push/target\ncampaigns\n  POST   - /campaigns/create\nchannels\n  GET    - /channels\ncommerce\n  POST   - /commerce/trackPurchase\n  POST   - /commerce/updateCart\nemail\n  GET    - /email/viewInBrowser\n  POST   - /email/target\nworkflows\n  POST   - /workflows/triggerWorkflow\nsms\n  POST   - /sms/target\nwebPush\n  POST   - /webPush/target\nmessageTypes\n  GET    - /messageTypes\nexperiments\n  GET    - /experiments/metrics\ncatalogs\n  GET    - /catalogs\n  POST   - /catalogs\n  DELETE - /catalogs\ncatalogs.fieldMappings\n  GET    - /catalogs/{catalogName}/fieldMappings\n  PUT    - /catalogs/{catalogName}/fieldMappings\ncatalogs.items\n  GET    - /catalogs/{catalogName}/items\n  PUT    - /catalogs/{catalogName}/items\n  POST   - /catalogs/{catalogName}/items\n  PATCH  - /catalogs/{catalogName}/items\n  DELETE - /catalogs/{catalogName}/items\nsubscriptions\n  PUT    - /subscriptions\nsubscriptions.user\n  PATCH  - /subscriptions/{subscriptionGroup}/{subscriptionGroupId}/user\n  DELETE - /subscriptions/{subscriptionGroup}/{subscriptionGroupId}/user\n```\n\n### Development\n\nTo run the full tests with coverage:\n```\nnpm test\n```\n\nTo run test driven development:\n```\nnpm run tdd\n```\n\nTo list the implemented resources:\n```\nnode index.js\n```\n\n### Contributors\n- [julianmclain](https://github.com/julianmclain)\n- [dpolivy](https://github.com/dpolivy)\n- [blutter](https://github.com/blutter)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeoffdutton%2Fiterable-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeoffdutton%2Fiterable-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeoffdutton%2Fiterable-api/lists"}