Sha256: c49ec27fa557fc2045dc31e9cd4a10c2e679ca43a8d837eab873ba817252d196
Contents?: true
Size: 810 Bytes
Versions: 3
Compression:
Stored size: 810 Bytes
Contents
# ButterCMS API Ruby Client ## Setup To setup your project, follow these steps: 1. Install using `gem install buttercms-ruby` or by adding to your `Gemfile`: ```ruby gem 'buttercms-ruby', '~>1.0.1' ``` 2. Set your API token. ```ruby require 'buttercms-ruby' ButterCMS::api_token = "YourToken" ``` ## Quick Start ```ruby posts = ButterCMS::Post.all(page: 1, page_size: 10) puts posts.first.title puts posts.meta.next_page posts = ButterCMS::Post.search("my favorite post", {page: 1, page_size: 10}) puts posts.first.title post = ButterCMS::Post.find("post-slug") puts post.title author = ButterCMS::Author.find("author-slug") puts author.first_name category = ButterCMS::Category.find("category-slug") puts category.name rss_feed = ButterCMS::Feed.find(:rss) puts rss_feed.data ```
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
buttercms-ruby-1.0.7 | README.md |
buttercms-ruby-1.0.6 | README.md |
buttercms-ruby-1.0.5 | README.md |