sugarcrb 0.1.7 → 0.1.8

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d289971f4ca6ac4721c7a68bfb9e13453311ffd9
4
- data.tar.gz: 7470ff19764747c6470f7551fe7c0f33cce0ef43
3
+ metadata.gz: abef30c9fdda65054c091efa0145e080991d5241
4
+ data.tar.gz: 58b620f89c324e72d26b61bb54482cde2fb0e286
5
5
  SHA512:
6
- metadata.gz: 3760035d1eb92e0664ad2b40604da11e78261cca2fbfb7b91c72bfe9b9af6ecf8269d4cde7fb8236e4700dd6bc109403884319d0ffb233d6bdd7b0f8769d76fd
7
- data.tar.gz: 13d2baeed627f0d80ef29d7509ee7dd8773a3f3c7e6aab3a7f79728c5befbc8d277adab5ab9ca850031a066582847921100dbd5b13a0c75798af3e80b0241e79
6
+ metadata.gz: d93162c29bfb4acfe7a95d95a94d997238b6206f09702b7f03edf5fcc911ad0420607b68945e1bc6fef0e84403266d0780e91a1967552a0d1e6e86f3e195f85d
7
+ data.tar.gz: c45f76fa1ba8145366ed688ef278acefb71970cc050f40d1be5d6a96ebe5c682b6a78a7bda595c0ffc2a3600e799885d1799e2d52e7218f94abe9cec4e5977b9
data/README.md CHANGED
@@ -22,7 +22,71 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
25
+ Login
26
+
27
+ ```ruby
28
+ sugarcrb = Sugarcrb.new(<host>,<username>,<password>,<platform>,<client id>,<client secret>)
29
+
30
+ sugarcrb = Sugarcrb.new("https://instance.sugarondemand.com","admin","xxxxxx","test","sugar","")
31
+ ```
32
+
33
+ Call endpoint
34
+
35
+ ```ruby
36
+ response = sugarcrb.call "<method>", "<url endpoint>", <data>
37
+ ```
38
+
39
+ Create a bean
40
+
41
+ ```ruby
42
+ response = sugarcrb.call "post", "<module>", <data>
43
+ response = sugarcrb.call "post", "Accounts", {
44
+ "name" => "My Account"
45
+ }
46
+ account_data = JSON.load(response)
47
+ ```
48
+
49
+ List beans
50
+
51
+ ```ruby
52
+ response = sugarcrb.call "get", "<module>"
53
+
54
+ response = sugarcrb.call "get", "Accounts"
55
+ accounts_data = JSON.load(response)
56
+ accounts_data['records']
57
+ ```
58
+
59
+ Get a bean
60
+
61
+ ```ruby
62
+ response = sugarcrb.call "get", "<module>/<id>"
63
+
64
+ response = sugarcrb.call "get", "Accounts/dffe626e-08d2-11e7-9113-06b20b8677ed"
65
+ account_data = JSON.load(response)
66
+ ```
67
+
68
+ Update a bean
69
+
70
+ ```ruby
71
+ response = sugarcrb.call "put", "<module>/<id>", <data>
72
+
73
+ response = sugarcrb.call "put", "Accounts/dffe626e-08d2-11e7-9113-06b20b8677ed", {
74
+ "name" => "My Favorite Account"
75
+ }
76
+ account_data = JSON.load(response)
77
+ ```
78
+
79
+ Delete a bean
80
+
81
+ ```ruby
82
+ response = sugarcrb.call "delete", "<module>/<id>"
83
+
84
+ response = sugarcrb.call "delete", "Accounts/dffe626e-08d2-11e7-9113-06b20b8677ed"
85
+ if response.code == 200 then
86
+ puts "deleted"
87
+ end
88
+ ```
89
+
26
90
 
27
91
  ## Development
28
92
 
@@ -1,3 +1,3 @@
1
1
  class Sugarcrb
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
data/sugarcrb.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["pedroalbertose007@gmail.com"]
11
11
 
12
12
  spec.summary = "Sugarcrm client"
13
- spec.description = "Gem to use create a cliente to SugarCRM by API rest V10"
13
+ spec.description = "Gem to create a client to Consume SugarCRM's API rest V10"
14
14
  spec.homepage = "https://rubygems.org/gems/sugarcrb"
15
15
  spec.license = "MIT"
16
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sugarcrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - betobaz
@@ -80,7 +80,7 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '2.3'
83
- description: Gem to use create a cliente to SugarCRM by API rest V10
83
+ description: Gem to create a client to Consume SugarCRM's API rest V10
84
84
  email:
85
85
  - pedroalbertose007@gmail.com
86
86
  executables: []