Git Product home page Git Product logo

webflow-php-sdk's Introduction

PHP SDK for the Webflow CMS API

Build Status

Implementation based on Webflow CMS API Reference

Features implemented

  • Get Current Authorization Info
  • List Sites
  • Get Specific Site
  • Publish Site
  • List Domains
  • List Collections
  • Get Collection with Full Schema
  • Get All Items for a Collection (including paginated results)
  • Find one or Create Item by Name
  • Get Single Item
  • Create New Collection Item
  • Update Collection Item
  • Patch Collection Item
  • Remove Collection Item

Usage

Check https://university.webflow.com/article/using-the-webflow-cms-api on how to generate YOUR_WEBFLOW_API_TOKEN

Get Current Authorization Info

$webflow = new \Webflow\Api('YOUR_WEBFLOW_API_TOKEN');
$webflow->info();

List Sites

$webflow->sites();

List Collections

$webflow->collections($siteid);

Get All Items for a Collection (including paginated results)

$webflow->itemsAll($collectionId);

Get Single Item

$webflow->item($collectionId, $itemId);

Create New Collection Item

$fields = [
    'name' => 'New item created via API',
    # ...
];
$webflow->createItem($collectionId, $fields);

Update Collection Item

$webflow->updateItem($collectionId, $itemId, $fields);

Remove Collection Item

$webflow->removeItem($collectionId, $itemId);

Installation

# Install Composer
composer require expertlead/webflow-php-sdk

No extra dependencies! You are welcome ;)

webflow-php-sdk's People

Contributors

assertchris avatar johncorrelli avatar tobya avatar wivern-co-uk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webflow-php-sdk's Issues

PR: API Version 2

Hello

As you may or may not know Webflow will be sunsetting their V1 api.

https://developers.webflow.com/data/docs/migrating-to-v2

I've been doing a little work to try to update this package to V2 for my own project.

If I was to submit a PR do you think you would be willing to merge it or provide a link on this repo to mine to send interested people in the right direction for a V2 library.

Thanks for the code. @wivern-co-uk

Exception class not found in WebflowException

Thanks so much for this SDK. Just encountered an error while using this - the WebflowException class extends Exception and this generates a fatal error when an attempt to throw WebflowException is made.

I think this is as simple as adding a use Exception statement to that file - or escaping Exception as \Exception

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.