11# microCMS Ruby SDK
22
3- [ microCMS] ( https://document.microcms.io/manual/api-request ) Ruby SDK.
3+ [ microCMS] ( https://document.microcms.io/ ) のRuby SDKです。
44
5- ## Tutorial
5+ ## 保守方針
66
7- See [ official tutorial ] ( https://document.microcms.io/tutorial/ruby/ruby-top ) .
7+ このSDKの現在の保守レベルは ` Maintenance ` です。
88
9- ## Installation
9+ 詳細は [ SDKの保守方針 ] ( https://document.microcms.io/manual/limitations#hc2b0bc6659 ) をご覧ください。
1010
11- Add this line to your application's Gemfile:
11+ ## チュートリアル
12+
13+ [ 公式チュートリアル] ( https://document.microcms.io/tutorial/ruby/ruby-top ) をご覧ください。
14+
15+ ## インストール
16+
17+ アプリケーションのGemfileに以下を追加します。
1218
1319``` ruby
1420gem ' microcms-ruby-sdk'
1521```
1622
17- And then execute:
23+ その後、以下を実行します。
1824
1925 $ bundle install
2026
21- Or install it yourself as:
27+ または、以下のコマンドで直接インストールできます。
2228
2329 $ gem install microcms-ruby-sdk
2430
25- ## Usage
31+ ## 使い方
2632
27- ### Import
33+ ### インポート
2834
2935``` rb
3036require ' microcms'
3137```
3238
33- ### Create client object
39+ ### クライアントオブジェクトの作成
3440
3541``` rb
3642MicroCMS .service_domain = ' YOUR_DOMAIN'
3743MicroCMS .api_key = ' YOUR_API_KEY'
3844```
3945
40- Note that the ` YOUR_DOMAIN ` is the subdomain name of your service (not the FQDN).
46+ ` YOUR_DOMAIN ` にはサービスのサブドメイン名( ` XXXX.microcms.io ` の ` XXXX ` の部分)を指定してください。FQDNではありません。
4147
42- ### Get content list
48+ ### コンテンツ一覧の取得
4349
4450``` rb
4551puts MicroCMS .list(' endpoint' )
4652```
4753
48- ### Get content list with parameters
54+ ### パラメータを指定したコンテンツ一覧の取得
4955
5056``` rb
5157puts MicroCMS .list(
@@ -55,7 +61,7 @@ puts MicroCMS.list(
5561 limit: 100 ,
5662 offset: 1 ,
5763 orders: [' updatedAt' ],
58- q: ' Hello ' ,
64+ q: ' こんにちは ' ,
5965 fields: %w[id title] ,
6066 ids: [' foo' ],
6167 filters: ' publishedAt[greater_than]2021-01-01' ,
@@ -64,13 +70,13 @@ puts MicroCMS.list(
6470)
6571```
6672
67- ### Get single content
73+ ### 単一コンテンツの取得
6874
6975``` rb
7076puts MicroCMS .get(' endpoint' , ' ruby' )
7177```
7278
73- ### Get single content with parameters
79+ ### パラメータを指定した単一コンテンツの取得
7480
7581``` rb
7682puts MicroCMS .get(
@@ -84,74 +90,73 @@ puts MicroCMS.get(
8490)
8591```
8692
87- ### Get object form content
93+ ### オブジェクト形式のコンテンツの取得
8894
8995``` rb
9096puts MicroCMS .get(' endpoint' )
9197```
9298
93- ### Create content
99+ ### コンテンツの作成
94100
95101``` rb
96- puts MicroCMS .create(' endpoint' , { text: ' Hello, microcms-ruby-sdk! ' })
102+ puts MicroCMS .create(' endpoint' , { text: ' こんにちは、 microcms-ruby-sdk! ' })
97103```
98104
99- ### Create content with specified ID
105+ ### IDを指定したコンテンツの作成
100106
101107``` rb
102108puts MicroCMS .create(
103109 ' endpoint' ,
104110 {
105111 id: ' my-content-id' ,
106- text: ' Hello, microcms-ruby-sdk! ' ,
112+ text: ' こんにちは、 microcms-ruby-sdk! ' ,
107113 },
108114)
109115```
110116
111- ### Create draft content
117+ ### 下書きコンテンツの作成
112118
113119``` rb
114120puts MicroCMS .create(
115121 ' endpoint' ,
116122 {
117123 id: ' my-content-id' ,
118- text: ' Hello, microcms-ruby-sdk! ' ,
124+ text: ' こんにちは、 microcms-ruby-sdk! ' ,
119125 },
120126 { status: ' draft' },
121127)
122128```
123129
124- ### Update content
130+ ### コンテンツの更新
125131
126132``` rb
127-
128133puts MicroCMS .update(
129134 ' endpoint' ,
130135 {
131136 id: ' microcms-ruby-sdk' ,
132- text: ' Hello, microcms-ruby-sdk update method! ' ,
137+ text: ' こんにちは、 microcms-ruby-sdkのupdateメソッド! ' ,
133138 },
134139)
135140```
136141
137- ### Update object form content
142+ ### オブジェクト形式のコンテンツの更新
138143
139144``` rb
140- puts MicroCMS .update(' endpoint' , { text: ' Hello, microcms-ruby-sdk update method! ' })
145+ puts MicroCMS .update(' endpoint' , { text: ' こんにちは、 microcms-ruby-sdkのupdateメソッド! ' })
141146```
142147
143- ### Delete content
148+ ### コンテンツの削除
144149
145150``` rb
146151MicroCMS .delete(' endpoint' , ' microcms-ruby-sdk' )
147152```
148153
149- ## Development
154+ ## 開発
150155
151- After checking out the repo, run ` bin/setup ` to install dependencies. You can also run ` bin/console ` for an interactive prompt that will allow you to experiment.
156+ リポジトリをチェックアウトした後、 ` bin/setup ` を実行して依存関係をインストールしてください。 ` bin/console ` を実行すると、対話形式で動作を確認できます。
152157
153- To install this gem onto your local machine, run ` bundle exec rake install ` . To release a new version, update the version number in ` version.rb ` , and then run ` bundle exec rake release ` , which will create a git tag for the version, push git commits and tags, and push the ` .gem ` file to [ rubygems.org] ( https://rubygems.org ) .
158+ このgemをローカル環境にインストールするには、 ` bundle exec rake install ` を実行してください。新しいバージョンをリリースするには、 ` version.rb ` のバージョン番号を更新してから ` bundle exec rake release ` を実行します。このコマンドはバージョンのgitタグを作成し、gitのコミットとタグをpushした後、 ` .gem ` ファイルを [ rubygems.org] ( https://rubygems.org ) にpushします。
154159
155- ## Contributing
160+ ## コントリビュート
156161
157- Bug reports and pull requests are welcome on GitHub at < https://github.com/microcmsio/microcms-ruby-sdk > .
162+ バグ報告やプルリクエストは、 [ GitHub] ( https://github.com/microcmsio/microcms-ruby-sdk ) で受け付けています。
0 commit comments