Project

webflow-rb

0.0
The project is in a healthy, maintained state
Webflow API wrapper
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

Webflow Build Status

Note

This is an active fork of the great webflow-ruby gem. webflow-ruby gem still works for Webflow API v1. If you're looking for a similar gem API (method names) but for Webflow API v2, try webflow-rb api-v2 branch.

Installation

Add this line to your application's Gemfile:

gem 'webflow-rb'

And then execute:

bundle

Or install it yourself as:

gem install webflow-rb

Usage

Check out lib/webflow/client.rb.

Check the official Webflow API v2 documentation at: https://developers.webflow.com/reference/list-collection-items

Basic usage:

client = Webflow::Client.new(ENV.fetch('WEBFLOW_API_TOKEN'))
sites = client.sites

Here are method signatures:

def sites
def site(site_id)
def publish(site_id)
def collections(site_id)
def collection(collection_id)
def list_items(collection_id, limit: 100, offset: 0)
def list_all_items(collection_id)
def get_item(collection_id, item_id)
def create_item(collection_id, data)
def update_item(collection_id, item_id, data)
def delete_item(collection_id, item_id)

Contributing

Bug reports and pull requests are welcome! If you're missing certain functionality, please open an issue or create a pull request.

To run all the tests (RuboCop linter and minitest tests), run bundle exec rake.

Plugins

  • webflow_sync - Keep Rails models in sync with WebFlow collections.

Thanks and Credits

This gem wouldn't be possible without the amazing work of webflow-ruby gem. Thank you, @phoet and @sega!

License

The gem is available as open source under the terms of the MIT License.