Created
November 8, 2017 09:31
-
-
Save gn-spawn/fcdd13c7c38b18b7d9db78a22de2048e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'crowi' | |
require 'sinatra' | |
require 'date' | |
client = Crowi::Client.new(base_url: "http://crowi.mlab.im.dendai.ac.jp/", access_token: "HOGE") | |
# Create page | |
post '/create' do | |
page = client.create_page("/日誌/#{Date.today}", params[:markdown]).body['page'] | |
puts page | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment