{"id":16361972,"url":"https://github.com/gido/postcardcreator","last_synced_at":"2025-06-24T13:38:20.663Z","repository":{"id":32044873,"uuid":"35616402","full_name":"gido/postcardcreator","owner":"gido","description":"A node.js API for the Swiss Post Postcard Creator","archived":false,"fork":false,"pushed_at":"2018-07-14T14:52:46.000Z","size":46,"stargazers_count":40,"open_issues_count":2,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-04T11:36:39.982Z","etag":null,"topics":["javascript","nodejs","postcard","swiss"],"latest_commit_sha":null,"homepage":null,"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/gido.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-14T14:39:37.000Z","updated_at":"2022-11-05T22:24:35.000Z","dependencies_parsed_at":"2022-09-16T07:11:36.681Z","dependency_job_id":null,"html_url":"https://github.com/gido/postcardcreator","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/gido/postcardcreator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gido%2Fpostcardcreator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gido%2Fpostcardcreator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gido%2Fpostcardcreator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gido%2Fpostcardcreator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gido","download_url":"https://codeload.github.com/gido/postcardcreator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gido%2Fpostcardcreator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259924405,"owners_count":22932753,"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":["javascript","nodejs","postcard","swiss"],"created_at":"2024-10-11T02:22:37.319Z","updated_at":"2025-06-24T13:38:20.625Z","avatar_url":"https://github.com/gido.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Postcard Creator API [![Build Status](https://travis-ci.org/gido/postcardcreator.svg?branch=master)](https://travis-ci.org/gido/postcardcreator)\nA node.js API for the [Swiss Post Postcard Creator](http://postcardcreator.post.ch).\n\n# Basic usage\n\n```javascript\nvar path = require('path'),\n    Postcardcreator = require('postcardcreator'),\n    SSOHelper = require('postcardcreator/helper/SSOPostHelper')(),\n    Postcard = Postcardcreator.Postcard;\n\nSSOHelper.getPostcardcreatorToken(postcard_user, postcard_pass, function(err, data) {\n\n    if (err) {\n        console.error(err);\n        return;\n    }\n\n    var client = new Postcardcreator(data.token);\n\n    var message = \"Hello, here is a picture of me. Best!\";\n    var assetStream = fs.createReadStream(path.join(__dirname, 'me_under_the_sun.jpg'));\n    // here is my real address you can use it to send me picture of your works ;-)\n    var recipient = {\n        salutation: \"Monsieur\",\n        givenName: \"Gilles\",\n        familyName: \"Doge\",\n        company: \"Antistatique.net\",\n        street: \"Rue de Sébeillon 9b\",\n        postCode: \"1004\",\n        place: \"Lausanne\"\n    };\n\n    var postcard = new Postcard(assetStream, message, recipient);\n\n    client.sendPostcard(postcard, function(err, result) {\n        if (err) {\n            console.log(\"Error when sending the postcard. \", err);\n            handleError(err);\n            return;\n        }\n\n        console.log(\"Postcard sent with success !\");\n        console.log(result);\n    });\n});\n```\n\n\n# License\nMIT\n\n# Related projects\n - [abertschi/postcard_creator_wrapper](https://github.com/abertschi/postcard_creator_wrapper) - Python wrapper around the Rest API of the Swiss Postcard Creator\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgido%2Fpostcardcreator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgido%2Fpostcardcreator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgido%2Fpostcardcreator/lists"}