arcgis_vrps 0.0.4.0 → 0.0.4.1

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: 8779fb51c195879850b9e6ee92ed8035ebedf10f
4
- data.tar.gz: 2e22c99ec989b7a4a8991359ab496f7974809706
3
+ metadata.gz: 7e8ee6d21dd34dde5eb5cf3994c5b363b6086ffd
4
+ data.tar.gz: 466c0874b64d914bfeb65e8923048f45bf8cf424
5
5
  SHA512:
6
- metadata.gz: e7e6d604d849b0b4db04a0e9a8bda53088cd369518593cce74c97edd89f532669ed68adf507f9171c27350377676c10f35ed0c6a8b9a9f595d7a9639688a364f
7
- data.tar.gz: f62618e0a569635b777909c9822125888f438f088c7724b315d18211ff833e58c361facad2b143d0784a87c66b16dbaede7a3352e1baee2527e9e28702a094f2
6
+ metadata.gz: 4de0973a24fc75e6dc0e01aa3f217a65e22ac64b1480cb4794ebead94d4c1e3934a142892f672796a1f96447ad8b0799479e50fe93997a8e408c5bf3e017ef9c
7
+ data.tar.gz: 5f0c7fb187f9d9d4427b5aedc2963e41504ed535109ce34a1f7f2658af7d70de3ab057b7721b9ea3c551d89e874e1fb954c6e5c8764f0306acafec7613a70425
data/lib/arcgis_vrps.rb CHANGED
@@ -30,14 +30,11 @@ class Arcgis_Vrps
30
30
 
31
31
  def initialize(client_id, client_secret)
32
32
  auth = Auth.new(client_id, client_secret)
33
- puts
34
- puts client_id +" --- " +client_secret
35
- puts
36
33
  @token = auth.generateToken
37
34
 
38
- puts
39
- puts "Token generated #{@token}"
40
- puts
35
+ # puts
36
+ # puts "Token generated #{@token}"
37
+ # puts
41
38
 
42
39
  end
43
40
 
@@ -2,6 +2,7 @@ require 'json'
2
2
  require 'net/http'
3
3
 
4
4
  class Auth
5
+ @token = ""
5
6
  def initialize(client_id, client_secret)
6
7
  if client_id.nil? || client_id.empty? || client_secret.nil? || client_secret.empty?
7
8
  raise ArgumentError, "Both Client ID & Client Secret has to be set"
@@ -33,7 +34,7 @@ class Auth
33
34
 
34
35
  res = http.request(req)
35
36
 
36
- token = JSON.parse(res.body)['access_token']
37
+ @token = JSON.parse(res.body)['access_token']
37
38
  puts "\n"+res.body
38
39
  return token
39
40
  rescue => e
@@ -41,4 +42,8 @@ class Auth
41
42
  puts e
42
43
  end
43
44
  end
45
+
46
+ def getToken
47
+ return @token
48
+ end
44
49
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arcgis_vrps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4.0
4
+ version: 0.0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kiong