paralleldots 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -1
- data/lib/paralleldots.rb +22 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74d72b96b13b5fe7d8064c444cd7fcde28d40305
|
4
|
+
data.tar.gz: 1c7edf8b879b2f893a25d085ff2e35465fcd2379
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21a6d82fe8fbb908897af78724805df5b3d1f8f8695b102444c824b7fde30a34bec35a5c420646ec72d062025abcdd506197c996362ba9848dcc01d7a4925204
|
7
|
+
data.tar.gz: 8b706603a5eb52b1b2b79db84934de4cd8ccec9b928820be0f63447f7e37712f1f829628f492def8275f41e94ea3b658b3ea13ba0cc7936bf451115dc58ec778
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ From Gem:
|
|
12
12
|
|
13
13
|
|
14
14
|
|
15
|
-
API Keys
|
15
|
+
API Keys & Setup
|
16
16
|
----------------
|
17
17
|
Signup and get your free API key from [ParallelDots]( http://www.paralleldots.com/pricing).
|
18
18
|
You will receive a mail containing the API key at the registered email id.
|
@@ -28,6 +28,13 @@ Configuration:
|
|
28
28
|
# Viewing your API key
|
29
29
|
> get_api_key()
|
30
30
|
|
31
|
+
Usage:
|
32
|
+
|
33
|
+
# View the number of API hits made and hits remaining
|
34
|
+
> hit_count()
|
35
|
+
|
36
|
+
# View the number of hits made for a specific API by using function name as a String
|
37
|
+
> specific_hit_count( "multilang_sentiment" )
|
31
38
|
|
32
39
|
|
33
40
|
Supported APIs:
|
data/lib/paralleldots.rb
CHANGED
@@ -123,4 +123,26 @@ def multilang_sentiment( text, 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
|
126
|
+
end
|
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://apis.paralleldots.com/hit_count", { apikey: 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://apis.paralleldots.com/specific_hit_count", { apikey: 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
|
126
148
|
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: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Meghdeep Ray
|
@@ -52,12 +52,13 @@ homepage: http://rubygems.org/gems/paralleldots
|
|
52
52
|
licenses:
|
53
53
|
- MIT
|
54
54
|
metadata: {}
|
55
|
-
post_install_message: |2
|
55
|
+
post_install_message: |2+
|
56
56
|
|
57
57
|
Installation Comlete !
|
58
58
|
Get your free API key: https://www.paralleldots.com/text-analysis-apis
|
59
59
|
Docs: https://www.paralleldots.com/docs/
|
60
60
|
Happy Coding !
|
61
|
+
|
61
62
|
rdoc_options: []
|
62
63
|
require_paths:
|
63
64
|
- lib
|