qst_client 0.1 → 0.2
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/lib/qst_client.rb +3 -1
- metadata +3 -3
data/lib/qst_client.rb
CHANGED
@@ -39,7 +39,8 @@ class QstClient
|
|
39
39
|
response['etag']
|
40
40
|
end
|
41
41
|
|
42
|
-
# Get messages from the server, optionally saying from which id to start
|
42
|
+
# Get messages from the server, optionally saying from which id to start.
|
43
|
+
# Returns an array of hashes similar to the one you would use to put_messages.
|
43
44
|
def get_messages(from_id = nil)
|
44
45
|
response = self.class.get "#{@url}/outgoing", :basic_auth => @auth
|
45
46
|
raise QstClient::Exception.new response unless (200 ... 400).include? response.code
|
@@ -109,6 +110,7 @@ class QstClient
|
|
109
110
|
|
110
111
|
response = self.class.post "#{@url}/incoming", :basic_auth => @auth, :body => xml.target!, :headers => {'Content-Type' => 'application/xml'}
|
111
112
|
raise QstClient::Exception.new response unless (200 ... 400).include? response.code
|
113
|
+
response['etag']
|
112
114
|
end
|
113
115
|
|
114
116
|
end
|
metadata
CHANGED