paralleldots 1.0.3 → 1.0.4

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 +10 -21
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b2af2ae59adaae08758033b305ab95956d9f0c2
4
- data.tar.gz: 0506714e25efb0a6068eaf12fe1b9218b95918ba
3
+ metadata.gz: 15ccb0000d818f8fb5759187e0dab41da08406c2
4
+ data.tar.gz: 8e3b56263e1b55d76d32879e9646aba9664e27ea
5
5
  SHA512:
6
- metadata.gz: 23e54e282694a958a49d9f60e4b5a784f028714967847d4e405bc85291058ba4f2f8eac393ad62eb45730f1531a59e1efee010d9c086a5ea1f0267d291fe8e7d
7
- data.tar.gz: c2ff5e63159a988ea5d27ad605709fd994782de38beb486f10bf15c51203f470237b142ad9f3f57d899c6576774bd0b81ca74aa9a310674209519d1e86739401
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
- #def hit_count()
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/v2/hit_count", { 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
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
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.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Meghdeep Ray