{"repo":"voxpelli/node-github-publish","free":true,"listed":false,"github":"https://github.com/voxpelli/node-github-publish","clone":"git clone https://github.com/voxpelli/node-github-publish.git","description":"Publishes a file to a repository through the GitHub Contents API","language":"JavaScript","stars":26,"topics":["github-api","api-wrapper","crud","node-js"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"GitHub Publish Publishes a file to a repository through the GitHub Contents API Installation NPM Current status Stable, but not feature complete Currently missing support for deletes. Usage Classes GitHubPublisher(token, username, repo, [branch]) – creates a publisher object with an access token for the GitHub API, the username of the owner of the repository to publish to and the name of the repository itself as repo . GitHubPublisher methods retrieve(filename) – returns a Promise that resolves with either an object containing the content and sha of the existing file or with false if no such file exists in the repository publish(filename, content, [options]) – publishes the specified content as the filename to the repo of the publisher object. content should be either a string or a Buffer . Returns a Promise which resolves to the sha of the created object on success and to false on failure (failure is likely caused by a collision with a pre-existing file, as long as one haven't specified that it should be overridden). publish() options force – whether to replace any pre-existing file no matter what message – a custom commit message. Default is new content sha – the sha of an existing file that one wants to replace","default_branch":null,"files":null,"tree":[],"storefront":"/r/voxpelli","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/voxpelli/node-github-publish/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}