All Projects → siteleaf → siteleaf-node

siteleaf / siteleaf-node

Licence: other
Node library for Siteleaf v2 API

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to siteleaf-node

approveapi-go
A Go library for using ApproveAPI
Stars: ✭ 16 (+14.29%)
Mutual labels:  api-client
canvas python sdk
Canvas Python SDK
Stars: ✭ 21 (+50%)
Mutual labels:  api-client
fusionauth-typescript-client
A TypeScript client for FusionAuth
Stars: ✭ 37 (+164.29%)
Mutual labels:  api-client
ruby-ipfs-http-client
A client library for the IPFS HTTP API, implemented in Ruby.
Stars: ✭ 21 (+50%)
Mutual labels:  api-client
tyfon
typed functions over network
Stars: ✭ 38 (+171.43%)
Mutual labels:  api-client
vsphere-automation-sdk-rest
REST (Postman and JavaScript) samples and API reference documentation for vSphere using the VMware REST API
Stars: ✭ 194 (+1285.71%)
Mutual labels:  api-client
laravel-bitcoinrpc
Bitcoin JSON-RPC Service Provider for Laravel.
Stars: ✭ 83 (+492.86%)
Mutual labels:  api-client
GenomicDataCommons
Provide R access to the NCI Genomic Data Commons portal.
Stars: ✭ 64 (+357.14%)
Mutual labels:  api-client
salt-netapi-client
Java bindings for the Salt API
Stars: ✭ 78 (+457.14%)
Mutual labels:  api-client
nodejs-passdock
PassDock API methods for iOS Wallet (PassBook)
Stars: ✭ 13 (-7.14%)
Mutual labels:  api-client
webapi
WAI based library for web api
Stars: ✭ 27 (+92.86%)
Mutual labels:  api-client
helpscout-docs-api-php
DocsApi client for HelpScout
Stars: ✭ 21 (+50%)
Mutual labels:  api-client
youtube-deno
A Deno client library of the YouTube Data API.
Stars: ✭ 30 (+114.29%)
Mutual labels:  api-client
Custom-Software-For-Xiaomi-Dafang
API and panel site for Xiaomi Dafang
Stars: ✭ 36 (+157.14%)
Mutual labels:  api-client
ContextIO-node
[DEPRECATED] - Official Node.js client library for the Context.IO Email API
Stars: ✭ 86 (+514.29%)
Mutual labels:  api-client
healthchecksio
Update and display the status of your healthchecks.io checks.
Stars: ✭ 30 (+114.29%)
Mutual labels:  api-client
adyen-dotnet-api-library
Adyen API Library for .NET
Stars: ✭ 69 (+392.86%)
Mutual labels:  api-client
poloniex-api
ARCHIVED --- A Go wrapper to the Poloniex API
Stars: ✭ 15 (+7.14%)
Mutual labels:  api-client
go-kkbox
KKBOX Open API SDK for Golang.
Stars: ✭ 16 (+14.29%)
Mutual labels:  api-client
thetvdb2
Thetvdb.com API v2 Client
Stars: ✭ 33 (+135.71%)
Mutual labels:  api-client

ALPHA: This is a work in progress node library for the Siteleaf v2 API.

About Siteleaf

Siteleaf 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.

Installation

npm install siteleaf

Usage

var Siteleaf = require('siteleaf')

var client = new Siteleaf({
  apiKey: "YOUR SITELEAF API KEY HERE",
  apiSecret: "YOUR SITELEAF API SECRET HERE"
});

(Access your API keys from your Siteleaf account page)

All requests are made using the request-promise package, therefore all requests return a Promise with the response as the first argument.

request(path, params)

A generic method for making Siteleaf API requests:

GET requests:

client.request(`sites/${config.site_id}/pages`, {
  qs: { per_page: 50 }
}).then(function (pages) {
  console.log(pages);
});

POST/PUT requests:

client.request(`sites/${config.site_id}/pages`, {
  method: 'POST',
  body: {
    body: "Hello world",
    title: "Example",
    path: "example",
    metadata: {
      colors: ["Red", "Green", "Blue"]
    }
  }
}).then(function (page) {
  console.log("Created page with slug: %s", page.slug);
});

DELETE requests:

client.request(`pages/${page.id}`, { method: 'DELETE' });
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].