sugarcrb 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sugarcrb.rb +10 -10
- data/lib/sugarcrb/version.rb +1 -1
- data/sugarcrb.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4016c7007c983085431a28b62524dc26e7a209d5
|
4
|
+
data.tar.gz: f291680f8d3b0a0f2e2bed5bed7c7c9fe133bdf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14f5f844a8053ab35599a13493f4226499d06ecdaab6c377d5bb0ae8c29a2ac25b87219cc6212de3d1331b1c31d7f23499d72976e7f9fb401a4296db8f655693
|
7
|
+
data.tar.gz: fad3a022f9ef6c548652ed3b77277f8bd46efe1ed10f6fe1ff22bbfbf0aea7f4948cbdcd6955d199100bd3cd2fb60f6ead5a6fdc9d8bc4dd45067fd9ebe4375e
|
data/lib/sugarcrb.rb
CHANGED
@@ -21,12 +21,12 @@ class Sugarcrb
|
|
21
21
|
|
22
22
|
def oauth2_token (refresh = false)
|
23
23
|
data = {
|
24
|
-
"grant_type"
|
25
|
-
"client_id"
|
26
|
-
"client_secret"
|
27
|
-
"username"
|
28
|
-
"password"
|
29
|
-
"platform"
|
24
|
+
"grant_type" => "password",
|
25
|
+
"client_id" => @client_id,
|
26
|
+
"client_secret" => @client_secret,
|
27
|
+
"username"=> @username,
|
28
|
+
"password"=> @password,
|
29
|
+
"platform"=> @platform
|
30
30
|
}
|
31
31
|
response = RestClient.post "#{@host}/rest/v10/oauth2/token", data
|
32
32
|
response_json = JSON.load(response)
|
@@ -39,10 +39,10 @@ class Sugarcrb
|
|
39
39
|
|
40
40
|
def oauth2_refresh_token
|
41
41
|
data = {
|
42
|
-
"grant_type"
|
43
|
-
"refresh_token"
|
44
|
-
"client_id"
|
45
|
-
"client_secret"
|
42
|
+
"grant_type"=> "refresh_token",
|
43
|
+
"refresh_token"=> @refresh_token,
|
44
|
+
"client_id"=> @client_id,
|
45
|
+
"client_secret"=> @client_secret,
|
46
46
|
}
|
47
47
|
begin
|
48
48
|
response = RestClient.post "#{@host}/rest/v10/oauth2/token", data
|
data/lib/sugarcrb/version.rb
CHANGED
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 create a client to Consume SugarCRM
|
13
|
+
spec.description = "Gem to create a client to Consume SugarCRM API rest V10"
|
14
14
|
spec.homepage = "https://rubygems.org/gems/sugarcrb"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sugarcrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- betobaz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -80,7 +80,7 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '2.3'
|
83
|
-
description: Gem to create a client to Consume SugarCRM
|
83
|
+
description: Gem to create a client to Consume SugarCRM API rest V10
|
84
84
|
email:
|
85
85
|
- pedroalbertose007@gmail.com
|
86
86
|
executables: []
|