paralleldots 1.0.2 → 1.0.3

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/paralleldots.rb +11 -11
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb0c99a7ea0a26d048f21330d2a1535075bc9de4
4
- data.tar.gz: fec48245a19cab49eac17129c6d16112d27ae742
3
+ metadata.gz: 9b2af2ae59adaae08758033b305ab95956d9f0c2
4
+ data.tar.gz: 0506714e25efb0a6068eaf12fe1b9218b95918ba
5
5
  SHA512:
6
- metadata.gz: 3d00551b5b7693825dad7b62ae32d973568aec2c94284a313732517d50b0dff1802d16f509dc315004040498dc86463a24b579c131a08925434522c9feeca87c
7
- data.tar.gz: f8b67a07f3507d561fee924e72956a8dc5c49e029fcd812dea23bcc0d56a61ce96a090160d3c8f992c20d503aae2e423b5076bfbe25fdeb4c63b6c3a3b6390e7
6
+ metadata.gz: 23e54e282694a958a49d9f60e4b5a784f028714967847d4e405bc85291058ba4f2f8eac393ad62eb45730f1531a59e1efee010d9c086a5ea1f0267d291fe8e7d
7
+ data.tar.gz: c2ff5e63159a988ea5d27ad605709fd994782de38beb486f10bf15c51203f470237b142ad9f3f57d899c6576774bd0b81ca74aa9a310674209519d1e86739401
data/lib/paralleldots.rb CHANGED
@@ -21,7 +21,7 @@ def sentiment( text )
21
21
  if valid != true then
22
22
  return valid
23
23
  end
24
- response = RestClient.post "http://35.202.76.177/sentiment", { api_key: api_key, text: text }
24
+ response = RestClient.post "http://35.202.76.177/v2/sentiment", { api_key: api_key, text: text }
25
25
  response = JSON.parse( response )
26
26
  response[ "usage" ] = "By accessing ParallelDots API or using information generated by ParallelDots API, you are agreeing to be bound by the ParallelDots API Terms of Use: http://www.paralleldots.com/terms-and-conditions"
27
27
  return response
@@ -33,7 +33,7 @@ def ner( text )
33
33
  if valid != true then
34
34
  return valid
35
35
  end
36
- response = RestClient.post "http://35.202.76.177/ner", { api_key: api_key, text: text }
36
+ response = RestClient.post "http://35.202.76.177/v2/ner", { api_key: api_key, text: text }
37
37
  response = JSON.parse( response )
38
38
  response[ "usage" ] = "By accessing ParallelDots API or using information generated by ParallelDots API, you are agreeing to be bound by the ParallelDots API Terms of Use: http://www.paralleldots.com/terms-and-conditions"
39
39
  return response
@@ -45,7 +45,7 @@ def keywords( text )
45
45
  if valid != true then
46
46
  return valid
47
47
  end
48
- response = RestClient.post "http://35.202.76.177/keywords", { api_key: api_key, text: text }
48
+ response = RestClient.post "http://35.202.76.177/v2/keywords", { api_key: api_key, text: text }
49
49
  response = JSON.parse( response )
50
50
  response = { "keywords": response, "usage": "By accessing ParallelDots API or using information generated by ParallelDots API, you are agreeing to be bound by the ParallelDots API Terms of Use: http://www.paralleldots.com/terms-and-conditions" }
51
51
  return response
@@ -57,7 +57,7 @@ def intent( text )
57
57
  if valid != true then
58
58
  return valid
59
59
  end
60
- response = RestClient.post "http://35.202.76.177/intent", { api_key: api_key, text: text }
60
+ response = RestClient.post "http://35.202.76.177/v2/intent", { api_key: api_key, text: text }
61
61
  response = JSON.parse( response )
62
62
  response[ "usage" ] = "By accessing ParallelDots API or using information generated by ParallelDots API, you are agreeing to be bound by the ParallelDots API Terms of Use: http://www.paralleldots.com/terms-and-conditions"
63
63
  return response
@@ -69,7 +69,7 @@ def emotion( text )
69
69
  if valid != true then
70
70
  return valid
71
71
  end
72
- response = RestClient.post "http://35.202.76.177/emotion", { api_key: api_key, text: text }
72
+ response = RestClient.post "http://35.202.76.177/v2/emotion", { api_key: api_key, text: text }
73
73
  response = JSON.parse( response )
74
74
  response[ "usage" ] = "By accessing ParallelDots API or using information generated by ParallelDots API, you are agreeing to be bound by the ParallelDots API Terms of Use: http://www.paralleldots.com/terms-and-conditions"
75
75
  return response
@@ -81,7 +81,7 @@ def abuse( text )
81
81
  if valid != true then
82
82
  return valid
83
83
  end
84
- response = RestClient.post "http://35.202.76.177/abuse", { api_key: api_key, text: text }
84
+ response = RestClient.post "http://35.202.76.177/v2/abuse", { api_key: api_key, text: text }
85
85
  response = JSON.parse( response )
86
86
  response[ "usage" ] = "By accessing ParallelDots API or using information generated by ParallelDots API, you are agreeing to be bound by the ParallelDots API Terms of Use: http://www.paralleldots.com/terms-and-conditions"
87
87
  return response
@@ -93,7 +93,7 @@ def taxonomy( text )
93
93
  if valid != true then
94
94
  return valid
95
95
  end
96
- response = RestClient.post "http://35.202.76.177/taxonomy", { api_key: api_key, text: text }
96
+ response = RestClient.post "http://35.202.76.177/v2/taxonomy", { api_key: api_key, text: text }
97
97
  response = JSON.parse( response )
98
98
  response[ "usage" ] = "By accessing ParallelDots API or using information generated by ParallelDots API, you are agreeing to be bound by the ParallelDots API Terms of Use: http://www.paralleldots.com/terms-and-conditions"
99
99
  return response
@@ -106,7 +106,7 @@ def similarity( text_1, text_2 )
106
106
  if valid_1 != true or valid_2 != true then
107
107
  return { "text_1": valid_1, "text_2": valid_2 }
108
108
  end
109
- response = RestClient.post "http://35.202.76.177/semanticsimilarity", { api_key: api_key, text_1: text_1, text_2: text_2 }
109
+ response = RestClient.post "http://35.202.76.177/v2/semanticsimilarity", { api_key: api_key, text_1: text_1, text_2: text_2 }
110
110
  response = JSON.parse( response )
111
111
  response[ "usage" ] = "By accessing ParallelDots API or using information generated by ParallelDots API, you are agreeing to be bound by the ParallelDots API Terms of Use: http://www.paralleldots.com/terms-and-conditions"
112
112
  return response
@@ -119,7 +119,7 @@ def multilang_sentiment( text, lang )
119
119
  if valid_1 != true or valid_2 != true then
120
120
  return { "text": valid_1, "lang": valid_2 }
121
121
  end
122
- response = RestClient.post "http://35.202.76.177/multilang_sentiment", { api_key: api_key, text: text, lang: lang }
122
+ response = RestClient.post "http://35.202.76.177/v2/multilang_sentiment", { api_key: api_key, text: text, lang: lang }
123
123
  response = JSON.parse( response )
124
124
  response[ "usage" ] = "By accessing ParallelDots API or using information generated by ParallelDots API, you are agreeing to be bound by the ParallelDots API Terms of Use: http://www.paralleldots.com/terms-and-conditions"
125
125
  return response
@@ -130,7 +130,7 @@ end
130
130
  # if api_key == nil or api_key == "" then
131
131
  # return { "error": "API Key cannot be nil or an empty String." }
132
132
  # end
133
- # response = RestClient.post "http://35.202.76.177/hit_count", { api_key: api_key }
133
+ # response = RestClient.post "http://35.202.76.177/v2/hit_count", { api_key: api_key }
134
134
  # response = JSON.parse( response )
135
135
  # response[ "usage" ] = "By accessing ParallelDots API or using information generated by ParallelDots API, you are agreeing to be bound by the ParallelDots API Terms of Use: http://www.paralleldots.com/terms-and-conditions"
136
136
  # return response
@@ -141,7 +141,7 @@ end
141
141
  # if api_key == nil or api_key == "" then
142
142
  # return { "error": "API Key cannot be nil or an empty String." }
143
143
  # end
144
- # response = RestClient.post "http://35.202.76.177/specific_hit_count", { api_key: api_key, end_point: end_point }
144
+ # response = RestClient.post "http://35.202.76.177/v2/specific_hit_count", { api_key: api_key, end_point: end_point }
145
145
  # response = JSON.parse( response )
146
146
  # response[ "usage" ] = "By accessing ParallelDots API or using information generated by ParallelDots API, you are agreeing to be bound by the ParallelDots API Terms of Use: http://www.paralleldots.com/terms-and-conditions"
147
147
  # return response
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paralleldots
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Meghdeep Ray