ncmb-ruby 0.0.8 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -1
  3. data/lib/ncmb/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5d0e29e311cc0919ebab769a836bfedfa8cc266
4
- data.tar.gz: 226c595010babc8b27b7b537dd5a24434eb03c18
3
+ metadata.gz: 979bd16074ab08fdcfe8714d7f9ad238d520f305
4
+ data.tar.gz: cf3d812b92db7e12281a728fff64deb3ce7955e2
5
5
  SHA512:
6
- metadata.gz: 1c780ca670f81b18628df65e1239aac39e1a9dc26920889e38cabe77e44df4c69fbae53bef0025dd6cc6931853584cd132006c16738c6cc9cddba1feb12690dc
7
- data.tar.gz: 5b1ab1704c2bd74cd1f61050ab5a8c57ad8d231303df4b3992032a2305ad2a95de02446326f84169d778bc3596ea0de2849f4c351ee9fea8c2b090304258aa01
6
+ metadata.gz: 31fd1a013aace4edd376748d1027168924dd6c37201cc666a0b8eaff0700f4f48c5776c48185b76383304a2f17aa8a9be2709ce4a720fc47e325fecf7adc3b62
7
+ data.tar.gz: 4a865f8387e56be6881fa35819615145def184aa50b172e718c1cbdbf24588c7968c03fa76c76ec264895a769dea88de2da5e12155c63b3f8cebae4831450e27
data/README.md CHANGED
@@ -9,6 +9,12 @@ Changes Made
9
9
 
10
10
  Installation
11
11
  ------------
12
+ ```sh
13
+ $ gem install ncmb-ruby
14
+ ```
15
+
16
+ Or with Bundler in your Gemfile.
17
+
12
18
  ``` ruby
13
19
  gem 'ncmb-ruby'
14
20
  ```
@@ -16,7 +22,28 @@ gem 'ncmb-ruby'
16
22
  Basic Usage
17
23
  -----------
18
24
 
25
+ ### Client
26
+ ``` ruby
27
+ require 'ncmb'
28
+
29
+ @client = NCMB.initialize application_key: application_key, client_key: client_key
30
+
31
+ # POST data to test table
32
+ @client.request :post, "/2013-09-01/classes/test", {message: 'hello world'}
33
+
34
+ # GET data from test table
35
+ @client.request :get, "/2013-09-01/classes/test", {where: {message: 'hello world'}}
36
+
37
+ # PUT or update data in test table, assuming :objectId = SG8QsGCOVXxgOoPW
38
+ @client.request :put, "/2013-09-01/classes/test/SG8QsGCOVXxgOoPW", {message: 'good day'}
39
+
40
+ # DELETE data in test table, assuming :objectId = SG8QsGCOVXxgOoPW
41
+ @client.request :delete, "/2013-09-01/classes/test/SG8QsGCOVXxgOoPW"
19
42
  ```
43
+
44
+ ### Data Store
45
+
46
+ ``` ruby
20
47
  NCMB.initialize application_key: application_key, client_key: client_key
21
48
 
22
49
  @todo = NCMB::DataStore.new 'Todo'
@@ -26,7 +53,7 @@ puts "@todo[0].name #{@todo[0].name}"
26
53
 
27
54
  ### Register push notification
28
55
 
29
- ```
56
+ ``` ruby
30
57
  NCMB.initialize application_key: application_key, client_key: client_key
31
58
 
32
59
  @push = NCMB::Push.new
@@ -1,3 +1,3 @@
1
1
  module Ncmb
2
- VERSION = "0.0.8"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ncmb-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Lau