Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refinery CMS Rest API extension

License

NotificationsYou must be signed in to change notification settings

refinerycms-contrib/refinerycms-api

Repository files navigation

Build Status

This extension allows you to use a Rest API with Refinery CMS 3.0 and later.

TODO

  • Check Abilities
  • Fix specs

Installation

Simply put this in the Gemfile of your Refinery application:

gem'refinerycms-api',github:'refinerycms-contrib/refinerycms-api',branch:'master'

Then runbundle install to install it.

Generate and run migrations

$ rails g refinery:api# Generate initializer$ rake db:migrate

Then restart your server.

Usage

Create an API Token for your user

$rakerefinery_api:user:api_token:generateEMAIL=refinery@example.org

Pages

$curl --header"X-Refinery-Token: YOUR_API_TOKEN"http://localhost:3000/api/v1/pages$curl --header"X-Refinery-Token: YOUR_API_TOKEN"http://localhost:3000/api/v1/pages/1$curl --header"X-Refinery-Token: YOUR_API_TOKEN"http://localhost:3000/api/v1/pages/new$curl -XPOST --header"X-Refinery-Token: YOUR_API_TOKEN""http://localhost:3000/api/v1/pages" -d'page[title]=test'$curl -XPUT --header"X-Refinery-Token: YOUR_API_TOKEN""http://localhost:3000/api/v1/pages/1" -d'page[title]=test2'$curl -XDELETE -H"X-Refinery-Token: YOUR_API_TOKEN"http://localhost:3000/api/v1/pages/1

Images

$curl --header"X-Refinery-Token: YOUR_API_TOKEN"http://localhost:3000/api/v1/images$curl --header"X-Refinery-Token: YOUR_API_TOKEN"http://localhost:3000/api/v1/images/1$curl --header"X-Refinery-Token: YOUR_API_TOKEN"http://localhost:3000/api/v1/images/new

Resources

$curl --header"X-Refinery-Token: YOUR_API_TOKEN"http://localhost:3000/api/v1/resources$curl --header"X-Refinery-Token: YOUR_API_TOKEN"http://localhost:3000/api/v1/resources/1$curl --header"X-Refinery-Token: YOUR_API_TOKEN"http://localhost:3000/api/v1/resources/new

Contributing

Please see thecontributing.md file for instructions.

About

Refinery CMS Rest API extension

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp