ncmb-ruby 0.0.8 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +28 -1
- data/lib/ncmb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 979bd16074ab08fdcfe8714d7f9ad238d520f305
|
4
|
+
data.tar.gz: cf3d812b92db7e12281a728fff64deb3ce7955e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/ncmb/version.rb
CHANGED