idn_sdk_ruby 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd81d947e382d29113b408af3f4417de0b34f8f2
4
- data.tar.gz: 26f31b7e9e47723e9af7ae8d7c4d89edac50dde0
3
+ metadata.gz: 064c50cf829062f12d8823947d80ee1acfbb6a87
4
+ data.tar.gz: c0496945402cea01d5f8dfd7e06549dc8dad402e
5
5
  SHA512:
6
- metadata.gz: aa8ffdc76202912aa26e51b81686f107c98e517fdb902502dffba20ebd6e3b5f9a8950530c2f7299fbaf6309664a4f621b563cadaf5b3bd29a6a1de2ed324d15
7
- data.tar.gz: 883e6da818c1f93070d7474a0ef282e14d20926fcd7d1cc5391352ccd5bb966ed785dd70d13522fe04367a98e6d2ffcd1981379ec6d892bea4dc6d30df688dac
6
+ metadata.gz: 6bc67e0bb345fc627029e79b82be5696fd517476807a825be40755d1125be580db875c0ab43ac94c3d3e0f0e1d79a9a2356cb5c1d40a57d7a26aba9f1a29fedb
7
+ data.tar.gz: cee1104048c395cb2314f977b8087e5d648ef3f71af338dd4fef61580140a4ae7a64908e4f71e9a5b82f95fdfc694d51fd499ff0aa52cac636da7dadcc3527ad
@@ -23,7 +23,7 @@ module IdnSdkRuby
23
23
 
24
24
  include HTTMultiParty
25
25
 
26
- headers 'Accept' => 'application/json', 'Content-Type' => 'application/json'
26
+ headers 'Accept' => 'application/json'
27
27
 
28
28
  debug_output $stdout
29
29
 
@@ -46,7 +46,7 @@ module IdnSdkRuby
46
46
  scope = scope.nil? ? [] : scope
47
47
  body = {:client_id => clientId, :client_secret => clientSecret, :grant_type => grantType, :scope => scope}
48
48
  @host_url = "http://api.qa1.nbos.io" if @host_url.nil?
49
- response = self.class.send("post", @host_url+@tokenUrl, :body => body, :headers => {"Accept" => "application/json"})
49
+ response = self.class.send("post", @host_url+@tokenUrl, :body => body, :headers => {'Content-Type' => 'application/x-www-form-urlencoded'})
50
50
  return response
51
51
  end
52
52
 
@@ -56,14 +56,14 @@ module IdnSdkRuby
56
56
  def login(authorization, loginModel)
57
57
  @host_url = "http://api.qa1.nbos.io" if @host_url.nil?
58
58
  body = loginModel.to_s
59
- response = self.class.send("post", @host_url+@loginUrl, :body => body, :headers => {"Authorization" => "Bearer " + authorization})
59
+ response = self.class.send("post", @host_url+@loginUrl, :body => body, :headers => {"Authorization" => "Bearer " + authorization, 'Content-Type' => 'application/json'})
60
60
  return response
61
61
  end
62
62
 
63
63
  def signup(authorization, memberSignupModel)
64
64
  @host_url = "http://api.qa1.nbos.io" if @host_url.nil?
65
65
  body = memberSignupModel.to_s
66
- response = self.class.send("post", @host_url+@signupUrl, :body => body, :headers => {"Authorization" => "Bearer " + authorization})
66
+ response = self.class.send("post", @host_url+@signupUrl, :body => body, :headers => {"Authorization" => "Bearer " + authorization, 'Content-Type' => 'application/json'})
67
67
  return response
68
68
  end
69
69
 
@@ -73,7 +73,7 @@ module IdnSdkRuby
73
73
  def updateCredentials(authorization,updatePasswordApiModel)
74
74
  @host_url = "http://api.qa1.nbos.io" if @host_url.nil?
75
75
  body = updatePasswordApiModel.to_s
76
- response = self.class.send("post", @host_url+@changeUrl, :body => body, :headers => {"Authorization" => "Bearer " + authorization})
76
+ response = self.class.send("post", @host_url+@changeUrl, :body => body, :headers => {"Authorization" => "Bearer " + authorization, 'Content-Type' => 'application/json'})
77
77
  return response
78
78
  end
79
79
 
@@ -90,26 +90,26 @@ module IdnSdkRuby
90
90
  :accessToken => oauth_details[:credentials][:token],
91
91
  :expiresIn => "#{oauth_details[:credentials][:expires_at]}"
92
92
  }
93
- response = self.class.send("post", @host_url+@connect_service, :body => body.to_json, :headers => {"Authorization" => "Bearer " + authorization})
93
+ response = self.class.send("post", @host_url+@connect_service, :body => body.to_json, :headers => {"Authorization" => "Bearer " + authorization, 'Content-Type' => 'application/json'})
94
94
  return response
95
95
  end
96
96
 
97
97
  def logout(authorization)
98
98
  @host_url = "http://api.qa1.nbos.io" if @host_url.nil? #response= HTTParty.post(@host_url+@loginUrl,{:body => body, :headers => { "Authorization" => "Bearer #{authorization}"}})
99
- response = self.class.send("get", @host_url+@logoutUrl, :headers => {"Authorization" => "Bearer " + authorization})
99
+ response = self.class.send("get", @host_url+@logoutUrl, :headers => {"Authorization" => "Bearer " + authorization, 'Content-Type' => 'application/json'})
100
100
  return response
101
101
  end
102
102
 
103
103
  def getMemberDetails(authorization, uuid)
104
104
  @host_url = "http://api.qa1.nbos.io" if @host_url.nil?
105
- response = self.class.send("get", @host_url+@profileUrl+"/#{uuid}", :headers => {"Authorization" => "Bearer " + authorization})
105
+ response = self.class.send("get", @host_url+@profileUrl+"/#{uuid}", :headers => {"Authorization" => "Bearer " + authorization, 'Content-Type' => 'application/json'})
106
106
  return response
107
107
  end
108
108
 
109
109
  def updateMemberDetails(authorization, uuid, memberApiModel)
110
110
  @host_url = "http://api.qa1.nbos.io" if @host_url.nil?
111
111
  body = memberApiModel.to_s
112
- response = self.class.send("put", @host_url+@profileUrl+"/#{uuid}", :body => body, :headers => {"Authorization" => "Bearer " + authorization})
112
+ response = self.class.send("put", @host_url+@profileUrl+"/#{uuid}", :body => body, :headers => {"Authorization" => "Bearer " + authorization, 'Content-Type' => 'application/json'})
113
113
  return response
114
114
  end
115
115
 
@@ -135,7 +135,7 @@ module IdnSdkRuby
135
135
 
136
136
  def tokenVerify(authorization, tokenToVerify, module_key)
137
137
  @host_url = "http://api.qa1.nbos.io" if @host_url.nil?
138
- response = self.class.send("get", @host_url+@tokenVerifyUrl+"/#{tokenToVerify}", :headers => {"Authorization" => "Bearer " + authorization, "X-N-ModuleKey" => module_key})
138
+ response = self.class.send("get", @host_url+@tokenVerifyUrl+"/#{tokenToVerify}", :headers => {"Authorization" => "Bearer " + authorization, "X-N-ModuleKey" => module_key, 'Content-Type' => 'application/json'})
139
139
  return response
140
140
  end
141
141
 
@@ -1,3 +1,3 @@
1
1
  module IdnSdkRuby
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idn_sdk_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sekhar
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-15 00:00:00.000000000 Z
11
+ date: 2017-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httmultiparty