{"id":21297502,"url":"https://github.com/fvdm/nodejs-passdock","last_synced_at":"2025-07-11T18:32:29.736Z","repository":{"id":4745710,"uuid":"5895360","full_name":"fvdm/nodejs-passdock","owner":"fvdm","description":"PassDock API methods for iOS Wallet (PassBook)","archived":false,"fork":false,"pushed_at":"2025-04-05T19:53:00.000Z","size":64,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-05-27T13:05:36.993Z","etag":null,"topics":["api-client","nodejs","passbook","unlicense","wallet"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/passdock","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fvdm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-09-21T01:30:13.000Z","updated_at":"2025-04-05T19:53:03.000Z","dependencies_parsed_at":"2022-08-24T21:00:54.875Z","dependency_job_id":null,"html_url":"https://github.com/fvdm/nodejs-passdock","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/fvdm/nodejs-passdock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdm%2Fnodejs-passdock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdm%2Fnodejs-passdock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdm%2Fnodejs-passdock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdm%2Fnodejs-passdock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fvdm","download_url":"https://codeload.github.com/fvdm/nodejs-passdock/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdm%2Fnodejs-passdock/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263088760,"owners_count":23412134,"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":["api-client","nodejs","passbook","unlicense","wallet"],"created_at":"2024-11-21T14:37:49.936Z","updated_at":"2025-07-11T18:32:29.727Z","avatar_url":"https://github.com/fvdm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nodejs-passdock\n\nNode.js module for [PassDock](http://passdock.com/) API methods for iOS 6 PassBook.\n\nAPI docs: \u003chttps://api.passdock.com/doc\u003e\n\n\n## BETA notice\n\nThis module code and the consulting API are in an early development stage.\nThe methods may produced unexpected results.\n\n\n## Installation\n\n`npm install passdock`\n\n\n## Module usage\n\n```js\nconst passdock = require( 'passdock' );\n\npassdock.api.token = 'your authentication token';\n\npassdock.templates.list( console.log );\n```\n\n`api.token` is required to authenticate your API calls.\n\n\n## Methods\n\nEach method takes a `callback` function to process the result.\nThis callback receives two parameters: `result` and `error`.\nWhen an error occurs the `error` param is an **object** and `result` is the received unparsed text.\nWhen all is good `error` is **false** and `result` is the parsed JSON data.\n\n**Warning:** the `error` object may contain your API-key!\nMake sure this won't go public.\n\n```js\nfunction callback( result, error ) {\n  if( error ) {\n    console.log( `API trouble: ${error.reason}` );\n  } else {\n    console.log( result );\n  }\n}\n```\n\n\n### Templates\n\n#### templates.list ( callback )\n\nList all templates in your account.\n\n```js\npassdock.templates.list( templates =\u003e {\n  templates.forEach( template =\u003e console.log( template.title ) );\n} );\n```\n\n\n#### templates.show ( templateID, callback )\n\nGet one template identified with `templateID`.\n\n```js\npassdock.templates.show( 2309, template =\u003e {\n  console.log( `${template.title} - ${template.bar.message}` )\n} );\n```\n\n\n#### templates.delete ( templateID, callback )\n\nDelete a template `templateID` from your account.\n\n```js\npassdock.templates.delete( 2309, console.log );\n```\n\n\n### Passes\n\n\n#### passes.list ( templateID, callback )\n\nList all passes using template `templateID` in your account.\n\n```js\npassdock.passes.list( 2309, console.log );\n```\n\n\n#### passes.show ( templateID, passID, callback )\n\nGet one pass for `templateID` and `passID`.\n\n```js\npassdock.passes.show( 2309, 123, console.log );\n```\n\n\n#### passes.delete ( templateID, passID, callback )\n\nDelete one pass with `passID` using `templateID`.\n\n```js\npassdock.passes.delete( 2309, 123, console.log );\n```\n\n\n#### passes.create ( templateID, passObject, callback )\n\nCreate a new pass using `templateID`.\n\n`passObject` can have these properties:\n\nproperty          | description\n+-----------------|+-----------\nserial_number     | The serial number for the Pass, must be unique and cannot be changed\n\n[bar.message]     | The message to be put in the code\n[bar.altText]     | The alternative text that will be put below the code\n\n[KEYNAME.label]   | The label for the field, usually placed above the value\n[KEYNAME.value]   | The value of the field, usually placed below the label\n[KEYNAME.message] | The change message that will be shown in the lock screen and as notification when the value for the field is changed remotely\n\n```js\n// KFC pass\nconst pass = {\n  serial_number:  'helloWorld123',\n  bar: {\n    message:      'https://domain.tld/pass?id=123',\n  },\n  Date: {\n    value:        '05-04-2025'\n  },\n  PROMOTION: {\n    value:        'blah'\n  },\n  ADDRESS: {\n    label:        'Different',\n    value:        'hello world'\n  }\n}\n\npassdock.passes.create( 2309, pass, console.log );\n```\n\n\n#### passes.update( templateID, passID, pass, callback )\n\nUpdate an existing pass `passID` that is using `templateID`.\n\n`pass` can have the same properties as in `passes.create`, but only set the props you wish to change.\n\n```js\npassdock.passes.update( 2309, 432, { bar: { message: 'myapp://pass/123' } }, console.log );\n```\n\n\n## Unlicense\n\nThis is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or\ndistribute this software, either in source code form or as a compiled\nbinary, for any purpose, commercial or non-commercial, and by any\nmeans.\n\nIn jurisdictions that recognize copyright laws, the author or authors\nof this software dedicate any and all copyright interest in the\nsoftware to the public domain. We make this dedication for the benefit\nof the public at large and to the detriment of our heirs and\nsuccessors. We intend this dedication to be an overt act of\nrelinquishment in perpetuity of all present and future rights to this\nsoftware under copyright law.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to \u003chttps://unlicense.org/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffvdm%2Fnodejs-passdock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffvdm%2Fnodejs-passdock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffvdm%2Fnodejs-passdock/lists"}