paralleldots 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/paralleldots.rb +10 -21
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15ccb0000d818f8fb5759187e0dab41da08406c2
|
4
|
+
data.tar.gz: 8e3b56263e1b55d76d32879e9646aba9664e27ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db35a27058b135c81549f9fe721d88fb30b8e30a10fb688fe04da20ab9c10c29af308eb9a3bd92385954a4b8e68d59ce9b722df8fb972cd8abc4636642c8b43d
|
7
|
+
data.tar.gz: 807dee19761376c5f5b0ccb5df0c8de99d1a2d8a8f767f450a6d20c3ce06c0015d13a5d74b1ec3bbf8e38b3fc53e576932e834ad608da52ddbe7350fddfedb39
|
data/lib/paralleldots.rb
CHANGED
@@ -125,24 +125,13 @@ def multilang_sentiment( text, lang )
|
|
125
125
|
return response
|
126
126
|
end
|
127
127
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
#
|
139
|
-
#def specific_hit_count( end_point )
|
140
|
-
# api_key = get_api_key
|
141
|
-
# if api_key == nil or api_key == "" then
|
142
|
-
# return { "error": "API Key cannot be nil or an empty String." }
|
143
|
-
# end
|
144
|
-
# response = RestClient.post "http://35.202.76.177/v2/specific_hit_count", { api_key: api_key, end_point: end_point }
|
145
|
-
# response = JSON.parse( response )
|
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
|
-
# return response
|
148
|
-
#end
|
128
|
+
def usage()
|
129
|
+
api_key = get_api_key
|
130
|
+
if api_key == nil or api_key == "" then
|
131
|
+
return { "error": "API Key cannot be nil or an empty String." }
|
132
|
+
end
|
133
|
+
response = RestClient.post "http://35.202.76.177/usage", { api_key: api_key }
|
134
|
+
response = JSON.parse( response )
|
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
|
+
return response
|
137
|
+
end
|