{"id":22454476,"url":"https://github.com/siteleaf/siteleaf-node","last_synced_at":"2025-08-02T02:31:27.740Z","repository":{"id":57361994,"uuid":"44485252","full_name":"siteleaf/siteleaf-node","owner":"siteleaf","description":"Node library for Siteleaf v2 API","archived":false,"fork":false,"pushed_at":"2024-12-03T03:21:17.000Z","size":9,"stargazers_count":14,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-03T04:21:17.722Z","etag":null,"topics":["api","api-client","node","nodejs","siteleaf","siteleaf-api"],"latest_commit_sha":null,"homepage":"http://siteleaf.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siteleaf.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2015-10-18T16:07:14.000Z","updated_at":"2023-12-20T17:14:02.000Z","dependencies_parsed_at":"2022-09-26T16:40:41.809Z","dependency_job_id":null,"html_url":"https://github.com/siteleaf/siteleaf-node","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siteleaf%2Fsiteleaf-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siteleaf%2Fsiteleaf-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siteleaf%2Fsiteleaf-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siteleaf%2Fsiteleaf-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siteleaf","download_url":"https://codeload.github.com/siteleaf/siteleaf-node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228426122,"owners_count":17917790,"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","api-client","node","nodejs","siteleaf","siteleaf-api"],"created_at":"2024-12-06T07:08:05.758Z","updated_at":"2024-12-06T07:08:13.472Z","avatar_url":"https://github.com/siteleaf.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"**ALPHA: This is a work in progress node library for the Siteleaf v2 API.**\n\n# About Siteleaf\n\nSiteleaf is a smart, lightweight platform for creating and maintaining websites. We believe that content management shouldn’t be hard. That you should be able to host your website anywhere you want. That websites should be able to outlive their CMS. That our tools should be simplified, not dumbed down.\n\n# Installation\n\n```\nnpm install siteleaf\n```\n\n# Usage\n\n```js\nvar Siteleaf = require('siteleaf')\n\nvar client = new Siteleaf({\n  apiKey: \"YOUR SITELEAF API KEY HERE\",\n  apiSecret: \"YOUR SITELEAF API SECRET HERE\"\n});\n```\n\n(Access your API keys from your [Siteleaf account page](https://manage.siteleaf.com/account))\n\nAll requests are made using the [`request-promise`](https://www.npmjs.com/package/request-promise) package, therefore **all requests return a Promise with the response as the first argument.**\n\n## request(path, params)\n\nA generic method for making Siteleaf API requests:\n\nGET requests:\n\n```js\nclient.request(`sites/${config.site_id}/pages`, {\n  qs: { per_page: 50 }\n}).then(function (pages) {\n  console.log(pages);\n});\n```\n\nPOST/PUT requests:\n\n```js\nclient.request(`sites/${config.site_id}/pages`, {\n  method: 'POST',\n  body: {\n    body: \"Hello world\",\n    title: \"Example\",\n    path: \"example\",\n    metadata: {\n      colors: [\"Red\", \"Green\", \"Blue\"]\n    }\n  }\n}).then(function (page) {\n  console.log(\"Created page with slug: %s\", page.slug);\n});\n```\n\nDELETE requests:\n\n```js\nclient.request(`pages/${page.id}`, { method: 'DELETE' });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiteleaf%2Fsiteleaf-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiteleaf%2Fsiteleaf-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiteleaf%2Fsiteleaf-node/lists"}