lymbix 0.4.3 → 0.4.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.
- data/Changelog +2 -32
- data/README +2 -2
- data/lib/lymbix.rb +1 -1
- data/lib/lymbix/base.rb +4 -6
- data/lib/lymbix/configuration.rb +1 -1
- data/lib/lymbix/request.rb +2 -2
- metadata +6 -6
data/Changelog
CHANGED
@@ -1,36 +1,6 @@
|
|
1
|
+
v0.4.4 - removed methods not used.
|
1
2
|
v0.4.3 - can now specify which api_version to use
|
2
3
|
v0.4.2 - added reference_id to all methods using version 2.2 BETA
|
3
4
|
v0.4.1 - added reference_id param to flag_response
|
4
5
|
v0.4.0 - re-factored whole gem, implemented methods for 2.1 version
|
5
|
-
v0.3.7 - added endpoint attribute to Base for companies implementation
|
6
|
-
v0.3.6 - added end and start time to data points coming from toneaday
|
7
|
-
v.0.3.5 - added tonalize_article, tonalize_paragraph which belongs to the 2.0 version of gyrus, also modified the request to include the version header
|
8
|
-
v.0.3.4 - fixed issue when setting host it still kept default host instead
|
9
|
-
v.0.3.3 - gem now uses configuration class to set host properties for gyrus
|
10
|
-
v.0.3.2 - made incorrect changes to gem
|
11
|
-
v0.3.1 - rechanged dominant_words to use dominant_words on gyrus
|
12
|
-
v0.3.0 - changed dominant_words to post to dominants in gyrus instead of dominant_words, removed dominant_words_limit, removed promote method since we won't use it
|
13
|
-
v0.2.9 - fix response to_s
|
14
|
-
v0.2.8 - tonecheck beta functionality
|
15
|
-
v0.2.7 - added archive_user_data
|
16
|
-
v0.2.6 - changes for Medulla ratings reviewing
|
17
|
-
v0.2.5 - changes for Medulla release
|
18
|
-
v0.2.4 - gold data and new user fields (demographic information)
|
19
|
-
v0.2.3 - added last_checkout_date param to bad_ratings_count method
|
20
|
-
v0.2.2 - added method to get bad ratings count for toneaday users
|
21
|
-
v0.2.1 - changed the response for DataPoint.create method, added :phrase param to be able to rate words with gem
|
22
|
-
v0.2.0 - included the :worker_id parameter for data_points, added dominant_words_limit method, you can specify how many words you want back
|
23
|
-
v0.2.0 - changed response to json for contribution_count
|
24
|
-
v0.2.0 - added create method DataPoint
|
25
|
-
v0.1.7 - expunge method added
|
26
|
-
v0.1.6 - passing lymbix_user_id on authorize
|
27
|
-
v0.1.5 - authentication returns xml or json
|
28
|
-
v0.1.4 - Added open bar authentication
|
29
|
-
v0.0.8 - Added user fields for update and authenticate
|
30
|
-
v0.0.7 - error messages
|
31
|
-
v0.0.6 - production urlsponse
|
32
|
-
v0.0.5 - added files in gemspec
|
33
|
-
v0.0.4 - Working prototype, more classes
|
34
|
-
v0.0.3 - Put functionality in different files, request and base for now
|
35
|
-
v0.0.2 - Changing the gem to connect to fornix for authentication
|
36
|
-
v0.0.1 - Built gem
|
6
|
+
v0.3.7 - added endpoint attribute to Base for companies implementation
|
data/README
CHANGED
@@ -13,7 +13,7 @@ It is possible to tonalize a phrase like:
|
|
13
13
|
lymbix.tonalize("I like ruby.")
|
14
14
|
|
15
15
|
|
16
|
-
To be able to access this resource - please go to <a href="http://www.
|
16
|
+
To be able to access this resource - please go to <a href="http://www.lymbix.com">Lymbix.com</a> and create an account. You need to agree to the licensing terms, and your account needs to be approved. Once approved, you will be able to get your authentication key.
|
17
17
|
|
18
18
|
Note: The Lymbix gem requires the rest-client gem version >= 1.4.2
|
19
19
|
|
@@ -21,4 +21,4 @@ Note: The Lymbix gem requires the rest-client gem version >= 1.4.2
|
|
21
21
|
|
22
22
|
Authors:: Pat Roy, Josh Merchant, Matthew Lagacé, Mathieu Dargavel, Maxime Santerre
|
23
23
|
Copyright:: Lymbix Inc
|
24
|
-
License:: Subject to licensing terms - see http://www.
|
24
|
+
License:: Subject to licensing terms - see http://www.lymbix.com
|
data/lib/lymbix.rb
CHANGED
data/lib/lymbix/base.rb
CHANGED
@@ -4,21 +4,19 @@ module Lymbix
|
|
4
4
|
The Base class is the main class used in the Lymbix gem.
|
5
5
|
It incorporates all the methods used to tonalize.
|
6
6
|
|
7
|
-
To begin using the base class, you must get your authentication key provided from
|
7
|
+
To begin using the base class, you must get your authentication key provided from Lymbix.com and store the key in the @auth_key variable.
|
8
8
|
=end
|
9
9
|
|
10
10
|
class Base
|
11
11
|
# The user's authentication key
|
12
|
-
attr_accessor :auth_key
|
12
|
+
attr_accessor :auth_key
|
13
|
+
# API version to use
|
14
|
+
attr_accessor :api_version
|
13
15
|
|
14
16
|
def initialize(auth_key)
|
15
17
|
@auth_key = auth_key
|
16
18
|
@api_version = 2.1
|
17
19
|
end
|
18
|
-
|
19
|
-
def terms_lookup(article)
|
20
|
-
response = request(:post, 'terms_lookup',{:article => article}, {:accept => "application/json"}).data
|
21
|
-
end
|
22
20
|
|
23
21
|
# Tonalizes text using version 2.1,2.2 of ToneAPI
|
24
22
|
def tonalize(article, return_fields = nil, accept_type = nil, article_reference_id = nil)
|
data/lib/lymbix/configuration.rb
CHANGED
data/lib/lymbix/request.rb
CHANGED
@@ -16,7 +16,7 @@ module Lymbix
|
|
16
16
|
def connection
|
17
17
|
options = {}
|
18
18
|
options[:timeout] = 0
|
19
|
-
options[:headers] = {:USER_AGENT => "Lymbix Gem - 0.4.
|
19
|
+
options[:headers] = {:USER_AGENT => "Lymbix Gem - 0.4.4", :accept => self.header_hash[:accept_type], :AUTHENTICATION => self.header_hash[:auth_key], :VERSION => self.header_hash[:version]}
|
20
20
|
RestClient::Resource.new(self.url, options)
|
21
21
|
end
|
22
22
|
|
@@ -34,4 +34,4 @@ module Lymbix
|
|
34
34
|
Response.new(self.response)
|
35
35
|
end
|
36
36
|
end
|
37
|
-
end
|
37
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lymbix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 7
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 4
|
10
|
+
version: 0.4.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Patrick Roy
|
@@ -19,7 +19,7 @@ autorequire:
|
|
19
19
|
bindir: bin
|
20
20
|
cert_chain: []
|
21
21
|
|
22
|
-
date:
|
22
|
+
date: 2011-04-13 00:00:00 -03:00
|
23
23
|
default_executable:
|
24
24
|
dependencies: []
|
25
25
|
|
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
70
|
requirements: []
|
71
71
|
|
72
72
|
rubyforge_project:
|
73
|
-
rubygems_version: 1.
|
73
|
+
rubygems_version: 1.5.2
|
74
74
|
signing_key:
|
75
75
|
specification_version: 3
|
76
76
|
summary: The Lymbix gem provides an interface to gyrus (connotative logic and database).
|