spark_api 2.0.0 → 2.0.1
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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/spark_api/request.rb +13 -0
- data/spec/unit/spark_api/request_spec.rb +9 -1
- metadata +19 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7851c708d86ee3e4e8163208a82df7c3324b3e74bffe946f9835fd2ed1239956
|
|
4
|
+
data.tar.gz: 4e5e264d9171f59937ea86faf990f5da95b1d41db4c4c2061f3a5b83c7f8085e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8e8f11e72f6cd4156d31e7d51e10936213402e751dda09c9788e673a6469a76fb217554cd2b35daf2f4349485fbb8fd8ac94e21948bf39156b671ef5341ecfeb
|
|
7
|
+
data.tar.gz: 05ea289076fc911908aeaa5b130ca361eb46290c89baa8a4dade37b2dc8cf318a822748dc3b86c4652f10e1037c68c7994df7cf5484c4639ea20b835b4a3c948
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.0.
|
|
1
|
+
2.0.1
|
data/lib/spark_api/request.rb
CHANGED
|
@@ -42,6 +42,19 @@ module SparkApi
|
|
|
42
42
|
request(:put, path, body, options)
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
+
# Perform an HTTP PATCH request
|
|
46
|
+
#
|
|
47
|
+
# * path - Path of an api resource, excluding version and endpoint (domain) information
|
|
48
|
+
# * body - Hash for patch body data
|
|
49
|
+
# * options - Resource request options as specified being supported via and api resource
|
|
50
|
+
# :returns:
|
|
51
|
+
# Hash of the json results as documented in the api.
|
|
52
|
+
# :raises:
|
|
53
|
+
# SparkApi::ClientError or subclass if the request failed.
|
|
54
|
+
def patch(path, body = nil, options={})
|
|
55
|
+
request(:patch, path, body, options)
|
|
56
|
+
end
|
|
57
|
+
|
|
45
58
|
# Perform an HTTP DELETE request
|
|
46
59
|
#
|
|
47
60
|
# * path - Path of an api resource, excluding version and endpoint (domain) information
|
|
@@ -120,8 +120,11 @@ describe SparkApi do
|
|
|
120
120
|
}
|
|
121
121
|
stub.put('/v1/arraydata?ApiSig=SignedToken&AuthToken=1234', '{"D":["A","B","C"]}') {[200, {}, '{"D": {
|
|
122
122
|
"Success": true}}']}
|
|
123
|
+
stub.patch('/v1/contacts/1000?ApiSig=SignedToken&AuthToken=1234', '{"D":{"Contacts":[{"DisplayName":"WLMCEWENS Contact","PrimaryEmail":"wlmcewen789@fbsdata.com"}]}}') { [200, {}, '{"D": {
|
|
124
|
+
"Success": true}}']
|
|
125
|
+
}
|
|
123
126
|
stub.delete('/v1/contacts/1000?ApiSig=SignedToken&AuthToken=1234') { [200, {}, '{"D": {
|
|
124
|
-
"Success": true}}']
|
|
127
|
+
"Success": true}}']
|
|
125
128
|
}
|
|
126
129
|
# Other MISC requests
|
|
127
130
|
stub.post('/v1/stringdata?ApiSig=SignedToken&AuthToken=1234', 'I am a lonely String!') { [200, {}, '{"D": {
|
|
@@ -214,6 +217,11 @@ describe SparkApi do
|
|
|
214
217
|
expect(subject.put('/contacts/1000', data).size).to be(0)
|
|
215
218
|
# No validation here, if no error is raised, everything is hunky dory
|
|
216
219
|
end
|
|
220
|
+
it "should patch to a service" do
|
|
221
|
+
data = {"Contacts" => [{"DisplayName"=>"WLMCEWENS Contact","PrimaryEmail"=>"wlmcewen789@fbsdata.com"}]}
|
|
222
|
+
expect(subject.patch('/contacts/1000', data).size).to be(0)
|
|
223
|
+
# No validation here, if no error is raised, everything is hunky dory
|
|
224
|
+
end
|
|
217
225
|
it "should delete from a service" do
|
|
218
226
|
# This is a hypothetical unsupported service action at this time
|
|
219
227
|
expect(subject.delete('/contacts/1000').size).to be(0)
|
metadata
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spark_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brandon Hornseth
|
|
8
8
|
- Wade McEwen
|
|
9
|
-
autorequire:
|
|
9
|
+
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2026-05-06 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: addressable
|
|
@@ -129,6 +129,20 @@ dependencies:
|
|
|
129
129
|
- - ">="
|
|
130
130
|
- !ruby/object:Gem::Version
|
|
131
131
|
version: '0'
|
|
132
|
+
- !ruby/object:Gem::Dependency
|
|
133
|
+
name: multi_json
|
|
134
|
+
requirement: !ruby/object:Gem::Requirement
|
|
135
|
+
requirements:
|
|
136
|
+
- - "~>"
|
|
137
|
+
- !ruby/object:Gem::Version
|
|
138
|
+
version: 1.15.0
|
|
139
|
+
type: :development
|
|
140
|
+
prerelease: false
|
|
141
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
142
|
+
requirements:
|
|
143
|
+
- - "~>"
|
|
144
|
+
- !ruby/object:Gem::Version
|
|
145
|
+
version: 1.15.0
|
|
132
146
|
- !ruby/object:Gem::Dependency
|
|
133
147
|
name: rexml
|
|
134
148
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -521,7 +535,7 @@ homepage: https://github.com/sparkapi/spark_api
|
|
|
521
535
|
licenses:
|
|
522
536
|
- Apache 2.0
|
|
523
537
|
metadata: {}
|
|
524
|
-
post_install_message:
|
|
538
|
+
post_install_message:
|
|
525
539
|
rdoc_options: []
|
|
526
540
|
require_paths:
|
|
527
541
|
- lib
|
|
@@ -537,7 +551,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
537
551
|
version: '1.8'
|
|
538
552
|
requirements: []
|
|
539
553
|
rubygems_version: 3.5.22
|
|
540
|
-
signing_key:
|
|
554
|
+
signing_key:
|
|
541
555
|
specification_version: 4
|
|
542
556
|
summary: A library for interacting with the Spark web services.
|
|
543
557
|
test_files:
|