ruby-cleverdome 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/ruby-cleverdome.rb +42 -0
  2. metadata +2 -2
@@ -141,6 +141,48 @@ module RubyCleverdome
141
141
  check_body(resp_doc)
142
142
  end
143
143
 
144
+ def get_document_tags(session_id, doc_guid)
145
+ resp_doc = widgets_call(
146
+ :get_document_tags,
147
+ {
148
+ 'sessionID' => session_id,
149
+ 'documentGuid' => doc_guid
150
+ }).doc
151
+
152
+ check_body(resp_doc)
153
+
154
+ hash = resp_doc.xpath('//ReturnValue')[0]
155
+ .element_children.each_with_object(Hash.new) do |e, h|
156
+ h[Integer(e.at('ID').content)] = e.at('Name').content
157
+ end
158
+
159
+ hash
160
+ end
161
+
162
+ def add_document_tag(session_id, doc_guid, tag_text)
163
+ resp_doc = widgets_call(
164
+ :add_document_tag,
165
+ {
166
+ 'sessionID' => session_id,
167
+ 'documentGuid' => doc_guid,
168
+ 'tagName' => tag_text
169
+ }).doc
170
+
171
+ check_body(resp_doc)
172
+ end
173
+
174
+ def remove_document_tag(session_id, doc_guid, tag_id)
175
+ resp_doc = widgets_call(
176
+ :remove_document_tag,
177
+ {
178
+ 'sessionID' => session_id,
179
+ 'documentGuid' => doc_guid,
180
+ 'tagID' => tag_id
181
+ }).doc
182
+
183
+ check_body(resp_doc)
184
+ end
185
+
144
186
  def create_request(provider, uid)
145
187
  builder = Nokogiri::XML::Builder.new do |xml|
146
188
  xml['s'].Envelope('xmlns:s' => 'http://schemas.xmlsoap.org/soap/envelope/') {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-cleverdome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-09 00:00:00.000000000 Z
12
+ date: 2014-04-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: savon