spark_api 1.5.0 → 1.5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17eaaa74af21a3a858941c286e4731ae9d67d1b315f06f5a3409d78d7d4fa89e
4
- data.tar.gz: 51373eaa638eefed5245d88d78cc0e1374d75cdfe385c3c358d4d40348059514
3
+ metadata.gz: 3027a80b349e435252ad94cde1fd6b8e2045d5350250f29b582b6d7392d7da3e
4
+ data.tar.gz: 9464e6b802ee47398ecebb940776947a34f0f90390bf421a766021c11a1ea7cd
5
5
  SHA512:
6
- metadata.gz: 7d81cd63e089a1182557cdeb95ab1e52d526904879294f66e22026c68d3dd4dd5ec8408763fd9d62ac72a9fcf23964ee9eec3d5e6e104a214e33c5a46ece21f7
7
- data.tar.gz: c44265855abe3384dea240410e96230b68fca9f9ac3cef702feb1ff0e05d026d571833591d5fa4865c21f04dc9f48d7f2987ffc9895088ac5c4431d73fa9b3c0
6
+ metadata.gz: 4492a3dcb079b0c8a062a26232d9d7a6f3d46a05041696f37c580db654af46e9cbc01cbe25bcc58cae2eb3085c94395b1da74d8d88e9ffc76fc72aa38319080b
7
+ data.tar.gz: e551671321c8a26837677b76af2ee98e4877beaca9b655cc94ef0a65766b68c96695af399f812160f68e28c828d1332152ced85619e907f42912005ad34b334a
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.5.0
1
+ 1.5.4
@@ -63,6 +63,8 @@ module SparkApi
63
63
  # Perform an HTTP request (no data)
64
64
  def request(method, path, body, options)
65
65
  escaped_path = Addressable::URI.escape(path)
66
+ connection = @client.connection
67
+ connection.headers.merge!(options.delete(:override_headers) || {})
66
68
  request_opts = {
67
69
  :AuthToken => @session.auth_token
68
70
  }
@@ -76,10 +78,10 @@ module SparkApi
76
78
  request_path = "#{escaped_path}?#{build_url_parameters({"ApiSig"=>sig}.merge(request_opts))}"
77
79
  SparkApi.logger.debug { "Request: #{request_path}" }
78
80
  if body.nil?
79
- response = @client.connection.send(method, request_path)
81
+ response = connection.send(method, request_path)
80
82
  else
81
83
  SparkApi.logger.debug { "Data: #{body}" }
82
- response = @client.connection.send(method, request_path, body)
84
+ response = connection.send(method, request_path, body)
83
85
  end
84
86
  response
85
87
  end
@@ -42,6 +42,7 @@ module SparkApi
42
42
  def request(method, path, body, options={})
43
43
  escaped_path = Addressable::URI.escape(path)
44
44
  connection = @client.connection(true) # SSL Only!
45
+ connection.headers.merge!(options.delete(:override_headers) || {})
45
46
  connection.headers.merge!(self.auth_header)
46
47
 
47
48
  unless (@client.api_user.nil? || options[:ApiUser])
@@ -29,7 +29,11 @@ module SparkApi
29
29
  if paging.nil?
30
30
  results = response
31
31
  else
32
- q = CGI.parse(env[:url].query)
32
+ q = if http_method_override_request?(env)
33
+ CGI.parse(env[:request_body])
34
+ else
35
+ CGI.parse(env[:url].query)
36
+ end
33
37
  if q.key?("_pagination") && q["_pagination"].first == "count"
34
38
  results = paging['TotalRows']
35
39
  else
@@ -87,7 +91,13 @@ module SparkApi
87
91
 
88
92
  env[:body]
89
93
  end
90
-
94
+
95
+ private
96
+
97
+ def http_method_override_request?(env)
98
+ env[:request_headers]["X-HTTP-Method-Override"] == "GET"
99
+ end
100
+
91
101
  end
92
102
 
93
103
  Faraday::Response.register_middleware :spark_api => FaradayMiddleware
@@ -0,0 +1,30 @@
1
+ module SparkApi
2
+ module Models
3
+ module Media
4
+ # This module is effectively an interface and helper to combine common media
5
+ # actions and information. Media types (videos, virtual tours, etc)
6
+ # should include this module and implement the methods contained
7
+
8
+ def url
9
+ raise "Not Implemented"
10
+ end
11
+
12
+ def description
13
+ raise "Not Implemented"
14
+ end
15
+
16
+ def private?
17
+ attributes['Privacy'] == 'Private'
18
+ end
19
+
20
+ def public?
21
+ attributes['Privacy'] == 'Public'
22
+ end
23
+
24
+ def automatic?
25
+ attributes['Privacy'] == 'Automatic'
26
+ end
27
+
28
+ end
29
+ end
30
+ end
@@ -1,7 +1,12 @@
1
+ require 'net/http'
1
2
  module SparkApi
2
3
  module Models
3
4
  class Video < Base
4
5
  extend Subresource
6
+ include Media
7
+ include Concerns::Savable,
8
+ Concerns::Destroyable
9
+
5
10
  self.element_name = 'videos'
6
11
 
7
12
  def branded?
@@ -11,6 +16,109 @@ module SparkApi
11
16
  def unbranded?
12
17
  attributes['Type'] == 'unbranded'
13
18
  end
19
+
20
+ def url
21
+ attributes['ObjectHtml']
22
+ end
23
+
24
+ def description
25
+ attributes['Name']
26
+ end
27
+
28
+ # Some youtube URLS are youtu.be instead of youtube
29
+ SUPPORTED_VIDEO_TYPES = %w[vimeo youtu].freeze
30
+
31
+ def is_supported_type?
32
+ # Unfortunately there are so many formats of vimeo videos that we canot support all vimeo videos
33
+ # Therefore, we need to do a little more checking here and validate that we can get video codes out of the urls
34
+ (self.ObjectHtml.include?('youtu') && youtube_video_code.present?) || (self.ObjectHtml.include?('vimeo') && vimeo_video_code.present?)
35
+ end
36
+
37
+ def is_valid_iframe?
38
+ self.ObjectHtml.include?('<iframe') && self.ObjectHtml.include?('</iframe>')
39
+ end
40
+
41
+ # gets the thumbnail to be shown on supported (Vimeo and Youtube) videos
42
+ # YouTube provides a predictable url for each video's images
43
+ # for Vimeo, a get request is necessary
44
+ def display_image
45
+ url = self.video_link
46
+ if url
47
+ if(url.include?('youtube'))
48
+ youtube_thumbnail_url
49
+ else
50
+ vimeo_thumbnail_url
51
+ end
52
+ end
53
+ end
54
+
55
+ def video_link
56
+ return nil unless is_supported_type?
57
+
58
+ if self.ObjectHtml.include?('youtu')
59
+ youtube_link
60
+ elsif self.ObjectHtml.include?('vimeo')
61
+ vimeo_link
62
+ end
63
+ end
64
+
65
+ private
66
+
67
+ def vimeo_video_code
68
+ html = self.ObjectHtml
69
+ if html.match(/(src=)('|")((https:)?\/\/player\.vimeo\.com\/video\/)/)
70
+ new_url = html.split(/(src=')|(src=")/)
71
+ if new_url[2]
72
+ html = new_url[2].split(/("|')/)[0]
73
+ end
74
+ end
75
+ if html.match(/(?:.+?)?(player\.vimeo\.com|vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|)(\d+)(?:$|\/|\?))/)
76
+ code = html.split('/').last.split('?').first
77
+ # Vimeo Ids are always numerical
78
+ code.to_i.to_s === code ? code : nil
79
+ else
80
+ nil
81
+ end
82
+ end
83
+
84
+ # This if correctly embedded by the user is an embed
85
+ # If not, it could be pretty much anything
86
+ def youtube_video_code
87
+ html = self.ObjectHtml
88
+ if html.match(/(?:.+?)?(?:\/v\/|watch\/|\?v=|\&v=|youtu\.be\/|\/v=|^youtu\.be\/|embed\/|watch\%3Fv\%3D)([a-zA-Z0-9_-]{11})/) || html.match(/(iframe)(.*)(src=)('|")(https:\/\/www\.youtube\.com\/embed)/)
89
+ html.split(/([a-zA-Z0-9_-]{11})/)[1]
90
+ else
91
+ nil
92
+ end
93
+ end
94
+
95
+ def youtube_link
96
+ normalize_youtube_url
97
+ code = youtube_video_code
98
+ code ? "https://www.youtube.com/watch?v=#{code}" : nil
99
+ end
100
+
101
+ def vimeo_link
102
+ code = vimeo_video_code
103
+ code ? "https://vimeo.com/#{code}" : nil
104
+ end
105
+
106
+ def youtube_thumbnail_url
107
+ code = youtube_video_code
108
+ code ? "https://i1.ytimg.com/vi/#{code}/hqdefault.jpg" : nil
109
+ end
110
+
111
+ def vimeo_thumbnail_url
112
+ # due to the rate limiting issue that surfaced shortly before launch,
113
+ # we will temporarily not return vimeo thumbnails until
114
+ # there is bandwidth to implement the solution in FLEX-9959
115
+ return nil
116
+ end
117
+
118
+ def normalize_youtube_url
119
+ self.ObjectHtml.sub!('-nocookie', '')
120
+ end
121
+
14
122
  end
15
123
  end
16
124
  end
@@ -2,6 +2,10 @@ module SparkApi
2
2
  module Models
3
3
  class VirtualTour < Base
4
4
  extend Subresource
5
+ include Media
6
+ include Concerns::Savable,
7
+ Concerns::Destroyable
8
+
5
9
  self.element_name="virtualtours"
6
10
 
7
11
 
@@ -13,6 +17,18 @@ module SparkApi
13
17
  attributes["Type"] == "unbranded"
14
18
  end
15
19
 
20
+ def url
21
+ attributes['Uri']
22
+ end
23
+
24
+ def description
25
+ attributes['Name']
26
+ end
27
+
28
+ def display_image
29
+ # Currently we have no universally good mechanism to get images for virtual tours
30
+ return nil
31
+ end
16
32
  end
17
33
  end
18
34
  end
@@ -25,6 +25,7 @@ require 'spark_api/models/listing'
25
25
  require 'spark_api/models/listing_cart'
26
26
  require 'spark_api/models/listing_meta_translations'
27
27
  require 'spark_api/models/market_statistics'
28
+ require 'spark_api/models/media'
28
29
  require 'spark_api/models/message'
29
30
  require 'spark_api/models/news_feed_meta'
30
31
  require 'spark_api/models/newsfeed'
@@ -61,6 +61,22 @@ module SparkApi
61
61
  unless authenticated?
62
62
  authenticate
63
63
  end
64
+
65
+ # Allow use of the X-HTTP-Method-Override header to disguise excessively
66
+ # large GET/DELETE/HEAD requests as POST requests.
67
+ if options[:http_method_override]
68
+ options = options.clone
69
+ options.delete(:http_method_override)
70
+ body = URI.encode_www_form(options)
71
+ options = {
72
+ override_headers: {
73
+ "X-HTTP-Method-Override" => method.to_s.upcase,
74
+ "Content-Type" => "application/x-www-form-urlencoded"
75
+ }
76
+ }
77
+ method = :post
78
+ end
79
+
64
80
  attempts = 0
65
81
  begin
66
82
  request_opts = {}
data/lib/spark_api.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'rubygems'
2
2
  require 'logger'
3
3
  require 'multi_json'
4
+ require 'addressable'
4
5
 
5
6
  require 'spark_api/version'
6
7
  require 'spark_api/errors'
@@ -119,6 +119,25 @@ describe SparkApi::Authentication::ApiAuth do
119
119
  :status=>201)
120
120
  expect(subject.request(:post, "/#{SparkApi.version}/contacts", contact, args).status).to eq(201)
121
121
  end
122
+ it "should incorporate any override_headers it is given while excluding them from the resulting request" do
123
+ stub_auth_request
124
+ args = {
125
+ override_headers: {
126
+ "Some-Header" => "Some-Value"
127
+ },
128
+ ApiUser: "foobar",
129
+ some_other_param: "some_other_value"
130
+ }
131
+ body = "somerequestbodytext"
132
+ stub_request(:post, "https://api.sparkapi.com/v1/someservice?ApiSig=856f5c036137c0cef5d4d223cd0f42be&ApiUser=foobar&AuthToken=1234&some_other_param=some_other_value").
133
+ with(body: "somerequestbodytext", headers: args[:override_headers]).
134
+ to_return(body: '{"D": {
135
+ "Success": true,
136
+ "Results": []
137
+ }',
138
+ status: 200)
139
+ expect(subject.request(:post, "/#{SparkApi.version}/someservice", body, args).status).to eq(200)
140
+ end
122
141
  end
123
142
 
124
143
  describe "sign" do
@@ -97,6 +97,24 @@ describe SparkApi::Authentication::OAuth2 do
97
97
  :status=>201)
98
98
  expect(subject.request(:post, "/#{SparkApi.version}/contacts", contact, args).status).to eq(201)
99
99
  end
100
+ it "should incorporate any override_headers it is given while excluding them from the resulting request" do
101
+ subject.session = session
102
+ args = {
103
+ override_headers: {
104
+ "Some-Header" => "Some-Value"
105
+ },
106
+ some_other_param: "some_other_value"
107
+ }
108
+ body = "somerequestbodytext"
109
+ stub_request(:post, "https://api.sparkapi.com/#{SparkApi.version}/someservice?some_other_param=some_other_value").
110
+ with(body: body, headers: args[:override_headers]).
111
+ to_return(body: '{"D": {
112
+ "Success": true,
113
+ "Results": []
114
+ }',
115
+ status: 200)
116
+ expect(subject.request(:post, "/#{SparkApi.version}/someservice", body, args).status).to eq(200)
117
+ end
100
118
  end
101
119
 
102
120
  describe "sparkbar_token" do
@@ -181,6 +181,12 @@ describe Listing do
181
181
  count = Listing.count()
182
182
  expect(count).to eq(2001)
183
183
  end
184
+
185
+ on_get_it "should return the count even if http_method_override: true is passed" do
186
+ stub_api_post('/listings', '_pagination=count', 'count.json')
187
+ count = Listing.count(http_method_override: true)
188
+ expect(count).to eq(2001)
189
+ end
184
190
  end
185
191
 
186
192
  context "/listings/<listing_id>", :support do
@@ -160,7 +160,13 @@ describe SparkApi do
160
160
  }
161
161
  }']
162
162
  }
163
-
163
+ # For testing http_method_override. See associated test for more details.
164
+ stub.post('/v1/routetoproveweareposting?ApiSig=SignedToken&AuthToken=1234', 'some_param=some_value') { [200, {}, '{"D": {
165
+ "Success": true,
166
+ "Results": []
167
+ }
168
+ }']
169
+ }
164
170
  end
165
171
  @connection = test_connection(stubs)
166
172
  end
@@ -230,7 +236,7 @@ describe SparkApi do
230
236
  end
231
237
 
232
238
  it "should allow response object to be returned instead of body" do
233
- r = subject.get('/system', { full_response: true })
239
+ r = subject.get('/system', { some_param: 'something', full_response: true })
234
240
 
235
241
  expect(r.is_a?(Faraday::Response)).to be(true)
236
242
  expect(r.status).to eq(200)
@@ -248,7 +254,17 @@ describe SparkApi do
248
254
  expect(number.to_s).to eq(BigDecimal.new("9999999999999999999999999.99").to_s)
249
255
  end
250
256
  end
251
-
257
+
258
+ # This is a weird feature and it also gets a weird test that probably
259
+ # merits explanation:
260
+ #
261
+ # We have only stubbed POST for this route, so the below succeeding
262
+ # proves that we have converted our GET into a POST. It is additionally
263
+ # stubbed to prove that we turn the params into a body which excludes the
264
+ # http_method_override options as well as the override_headers options.
265
+ it "should convert GET to POST if http_method_override: true is supplied" do
266
+ expect(subject.get('/routetoproveweareposting', { http_method_override: true, some_param: "some_value" }).success?).to be true
267
+ end
252
268
  end
253
269
 
254
270
  context "when unauthenticated" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spark_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Hornseth
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-12-31 00:00:00.000000000 Z
12
+ date: 2021-11-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -273,6 +273,7 @@ files:
273
273
  - lib/spark_api/models/listing_cart.rb
274
274
  - lib/spark_api/models/listing_meta_translations.rb
275
275
  - lib/spark_api/models/market_statistics.rb
276
+ - lib/spark_api/models/media.rb
276
277
  - lib/spark_api/models/message.rb
277
278
  - lib/spark_api/models/news_feed_meta.rb
278
279
  - lib/spark_api/models/newsfeed.rb
@@ -533,208 +534,208 @@ required_rubygems_version: !ruby/object:Gem::Requirement
533
534
  - !ruby/object:Gem::Version
534
535
  version: '1.8'
535
536
  requirements: []
536
- rubygems_version: 3.1.4
537
+ rubygems_version: 3.1.6
537
538
  signing_key:
538
539
  specification_version: 4
539
540
  summary: A library for interacting with the Spark web services.
540
541
  test_files:
541
- - spec/fixtures/accounts/all.json
542
- - spec/fixtures/accounts/my_put.json
543
- - spec/fixtures/accounts/my_portal.json
544
- - spec/fixtures/accounts/office.json
545
- - spec/fixtures/accounts/my.json
546
- - spec/fixtures/accounts/password_save.json
547
- - spec/fixtures/accounts/my_save.json
542
+ - spec/fixtures/comments/post.json
543
+ - spec/fixtures/comments/get.json
544
+ - spec/fixtures/comments/new.json
545
+ - spec/fixtures/sharedlinks/success.json
546
+ - spec/fixtures/idx_links/get.json
547
+ - spec/fixtures/listing_carts/new_portal_cart.json
548
+ - spec/fixtures/listing_carts/post.json
549
+ - spec/fixtures/listing_carts/put.json
550
+ - spec/fixtures/listing_carts/remove_listing.json
551
+ - spec/fixtures/listing_carts/post_portal_cart.json
552
+ - spec/fixtures/listing_carts/listing_cart.json
553
+ - spec/fixtures/listing_carts/add_listing.json
554
+ - spec/fixtures/listing_carts/put_ids.json
555
+ - spec/fixtures/listing_carts/add_portal_cart_listings.json
556
+ - spec/fixtures/listing_carts/new.json
557
+ - spec/fixtures/listing_carts/add_listing_post.json
558
+ - spec/fixtures/listing_carts/add_listings.json
559
+ - spec/fixtures/listing_carts/listing_portal_cart.json
560
+ - spec/fixtures/listing_carts/empty.json
561
+ - spec/fixtures/listing_carts/add_listings_post.json
562
+ - spec/fixtures/listing_carts/put_name.json
563
+ - spec/fixtures/listing_carts/add_portal_cart_listings_post.json
564
+ - spec/fixtures/fields/order_a.json
565
+ - spec/fixtures/fields/order.json
566
+ - spec/fixtures/fields/settings.json
567
+ - spec/fixtures/newsfeeds/get.json
568
+ - spec/fixtures/newsfeeds/inactive.json
569
+ - spec/fixtures/newsfeeds/meta.json
548
570
  - spec/fixtures/authentication_failure.json
549
- - spec/fixtures/notes/new.json
550
- - spec/fixtures/notes/agent_shared.json
571
+ - spec/fixtures/generic_failure.json
551
572
  - spec/fixtures/notes/agent_shared_empty.json
552
573
  - spec/fixtures/notes/add.json
553
- - spec/fixtures/contacts/new_empty.json
554
- - spec/fixtures/contacts/contacts.json
555
- - spec/fixtures/contacts/new.json
556
- - spec/fixtures/contacts/tags.json
574
+ - spec/fixtures/notes/new.json
575
+ - spec/fixtures/notes/agent_shared.json
576
+ - spec/fixtures/finders.json
577
+ - spec/fixtures/notifications/post.json
578
+ - spec/fixtures/notifications/unread.json
579
+ - spec/fixtures/notifications/new.json
580
+ - spec/fixtures/notifications/mark_read.json
581
+ - spec/fixtures/notifications/notifications.json
582
+ - spec/fixtures/notifications/new_empty.json
557
583
  - spec/fixtures/contacts/post.json
584
+ - spec/fixtures/contacts/vow_accounts/post.json
585
+ - spec/fixtures/contacts/vow_accounts/edit.json
558
586
  - spec/fixtures/contacts/vow_accounts/get.json
559
587
  - spec/fixtures/contacts/vow_accounts/new.json
560
- - spec/fixtures/contacts/vow_accounts/edit.json
561
- - spec/fixtures/contacts/vow_accounts/post.json
588
+ - spec/fixtures/contacts/new.json
562
589
  - spec/fixtures/contacts/my.json
563
590
  - spec/fixtures/contacts/new_notify.json
564
- - spec/fixtures/session.json
565
- - spec/fixtures/no_results.json
566
- - spec/fixtures/base.json
567
- - spec/fixtures/success.json
568
- - spec/fixtures/logo_fbs.png
569
- - spec/fixtures/search_templates/quick_searches/get.json
570
- - spec/fixtures/sorts/get.json
571
- - spec/fixtures/errors/expired.json
591
+ - spec/fixtures/contacts/new_empty.json
592
+ - spec/fixtures/contacts/contacts.json
593
+ - spec/fixtures/contacts/tags.json
572
594
  - spec/fixtures/errors/failure_with_constraint.json
573
595
  - spec/fixtures/errors/failure.json
596
+ - spec/fixtures/errors/expired.json
574
597
  - spec/fixtures/errors/failure_with_msg.json
598
+ - spec/fixtures/messages/post.json
599
+ - spec/fixtures/messages/new_with_recipients.json
600
+ - spec/fixtures/messages/get.json
601
+ - spec/fixtures/messages/new.json
602
+ - spec/fixtures/messages/count.json
603
+ - spec/fixtures/messages/new_empty.json
604
+ - spec/fixtures/activities/get.json
605
+ - spec/fixtures/base.json
606
+ - spec/fixtures/accounts/my_put.json
607
+ - spec/fixtures/accounts/office.json
608
+ - spec/fixtures/accounts/all.json
609
+ - spec/fixtures/accounts/my.json
610
+ - spec/fixtures/accounts/password_save.json
611
+ - spec/fixtures/accounts/my_portal.json
612
+ - spec/fixtures/accounts/my_save.json
575
613
  - spec/fixtures/oauth2_error.json
576
- - spec/fixtures/portal/my_non_existant.json
614
+ - spec/fixtures/property_types/property_types.json
615
+ - spec/fixtures/portal/post.json
616
+ - spec/fixtures/portal/disable.json
577
617
  - spec/fixtures/portal/new.json
618
+ - spec/fixtures/portal/my_non_existant.json
578
619
  - spec/fixtures/portal/enable.json
579
- - spec/fixtures/portal/disable.json
580
- - spec/fixtures/portal/post.json
581
620
  - spec/fixtures/portal/my.json
582
- - spec/fixtures/rules/get.json
583
- - spec/fixtures/messages/new_empty.json
584
- - spec/fixtures/messages/get.json
585
- - spec/fixtures/messages/new_with_recipients.json
586
- - spec/fixtures/messages/new.json
587
- - spec/fixtures/messages/post.json
588
- - spec/fixtures/messages/count.json
589
- - spec/fixtures/comments/get.json
590
- - spec/fixtures/comments/new.json
591
- - spec/fixtures/comments/post.json
592
- - spec/fixtures/fields/settings.json
593
- - spec/fixtures/fields/order.json
594
- - spec/fixtures/fields/order_a.json
595
- - spec/fixtures/generic_failure.json
596
- - spec/fixtures/listing_carts/add_listings.json
597
- - spec/fixtures/listing_carts/listing_portal_cart.json
598
- - spec/fixtures/listing_carts/remove_listing.json
599
- - spec/fixtures/listing_carts/post_portal_cart.json
600
- - spec/fixtures/listing_carts/add_portal_cart_listings_post.json
601
- - spec/fixtures/listing_carts/put.json
602
- - spec/fixtures/listing_carts/new_portal_cart.json
603
- - spec/fixtures/listing_carts/new.json
604
- - spec/fixtures/listing_carts/add_listing_post.json
605
- - spec/fixtures/listing_carts/add_listings_post.json
606
- - spec/fixtures/listing_carts/put_ids.json
607
- - spec/fixtures/listing_carts/add_listing.json
608
- - spec/fixtures/listing_carts/post.json
609
- - spec/fixtures/listing_carts/listing_cart.json
610
- - spec/fixtures/listing_carts/empty.json
611
- - spec/fixtures/listing_carts/add_portal_cart_listings.json
612
- - spec/fixtures/listing_carts/put_name.json
613
- - spec/fixtures/notifications/new_empty.json
614
- - spec/fixtures/notifications/mark_read.json
615
- - spec/fixtures/notifications/new.json
616
- - spec/fixtures/notifications/notifications.json
617
- - spec/fixtures/notifications/post.json
618
- - spec/fixtures/notifications/unread.json
619
- - spec/fixtures/listing_meta_translations/get.json
620
- - spec/fixtures/finders.json
621
- - spec/fixtures/generic_delete.json
622
- - spec/fixtures/empty.json
621
+ - spec/fixtures/oauth2/refresh_body.json
623
622
  - spec/fixtures/oauth2/error.json
624
- - spec/fixtures/oauth2/access_with_old_refresh.json
623
+ - spec/fixtures/oauth2/access_with_refresh.json
624
+ - spec/fixtures/oauth2/access.json
625
625
  - spec/fixtures/oauth2/authorization_code_body.json
626
626
  - spec/fixtures/oauth2/password_body.json
627
- - spec/fixtures/oauth2/access.json
628
- - spec/fixtures/oauth2/access_with_refresh.json
629
- - spec/fixtures/oauth2/refresh_body.json
630
- - spec/fixtures/newsfeeds/get.json
631
- - spec/fixtures/newsfeeds/inactive.json
632
- - spec/fixtures/newsfeeds/meta.json
627
+ - spec/fixtures/oauth2/access_with_old_refresh.json
628
+ - spec/fixtures/sorts/get.json
629
+ - spec/fixtures/search_templates/quick_searches/get.json
630
+ - spec/fixtures/success.json
631
+ - spec/fixtures/no_results.json
632
+ - spec/fixtures/saved_searches/post.json
633
+ - spec/fixtures/saved_searches/with_newsfeed.json
634
+ - spec/fixtures/saved_searches/with_inactive_newsfeed.json
635
+ - spec/fixtures/saved_searches/get.json
636
+ - spec/fixtures/saved_searches/new.json
637
+ - spec/fixtures/saved_searches/update.json
638
+ - spec/fixtures/saved_searches/without_newsfeed.json
639
+ - spec/fixtures/saved_searches/get_provided.json
640
+ - spec/fixtures/count.json
641
+ - spec/fixtures/generic_delete.json
642
+ - spec/fixtures/logo_fbs.png
643
+ - spec/fixtures/empty.json
644
+ - spec/fixtures/standardfields/standardfields.json
645
+ - spec/fixtures/standardfields/stateorprovince.json
646
+ - spec/fixtures/standardfields/city.json
647
+ - spec/fixtures/standardfields/nearby.json
648
+ - spec/fixtures/listing_meta_translations/get.json
649
+ - spec/fixtures/rules/get.json
633
650
  - spec/fixtures/listings/rental_calendar.json
634
- - spec/fixtures/listings/constraints_with_pagination.json
635
- - spec/fixtures/listings/with_supplement.json
636
- - spec/fixtures/listings/put_expiration_date.json
637
- - spec/fixtures/listings/with_rental_calendar.json
638
- - spec/fixtures/listings/shared_listing_get.json
639
- - spec/fixtures/listings/photos/rotate.json
640
- - spec/fixtures/listings/photos/new.json
641
- - spec/fixtures/listings/photos/rollback.json
642
- - spec/fixtures/listings/photos/post.json
643
- - spec/fixtures/listings/photos/batch_delete.json
644
- - spec/fixtures/listings/photos/index.json
645
- - spec/fixtures/listings/tour_of_homes_search.json
646
- - spec/fixtures/listings/virtual_tours_index.json
647
- - spec/fixtures/listings/multiple.json
648
651
  - spec/fixtures/listings/shared_listing_new.json
649
652
  - spec/fixtures/listings/put.json
650
- - spec/fixtures/listings/shared_listing_post.json
653
+ - spec/fixtures/listings/virtual_tours_index.json
654
+ - spec/fixtures/listings/no_subresources.json
651
655
  - spec/fixtures/listings/videos_index.json
652
- - spec/fixtures/listings/document_index.json
653
- - spec/fixtures/listings/with_permissions.json
656
+ - spec/fixtures/listings/tour_of_homes_search.json
657
+ - spec/fixtures/listings/with_videos.json
658
+ - spec/fixtures/listings/photos/post.json
659
+ - spec/fixtures/listings/photos/rotate.json
660
+ - spec/fixtures/listings/photos/rollback.json
661
+ - spec/fixtures/listings/photos/new.json
662
+ - spec/fixtures/listings/photos/index.json
663
+ - spec/fixtures/listings/photos/batch_delete.json
654
664
  - spec/fixtures/listings/constraints.json
665
+ - spec/fixtures/listings/document_index.json
655
666
  - spec/fixtures/listings/with_vtour.json
656
- - spec/fixtures/listings/with_photos.json
657
- - spec/fixtures/listings/no_subresources.json
658
- - spec/fixtures/listings/with_videos.json
659
- - spec/fixtures/listings/with_documents.json
660
- - spec/fixtures/listings/reorder_photo.json
661
- - spec/fixtures/listings/floplans_index.json
662
667
  - spec/fixtures/listings/tour_of_homes.json
663
- - spec/fixtures/listings/put_reorder_photo.json
668
+ - spec/fixtures/listings/reorder_photo.json
664
669
  - spec/fixtures/listings/open_houses.json
665
- - spec/fixtures/standardfields/stateorprovince.json
666
- - spec/fixtures/standardfields/standardfields.json
667
- - spec/fixtures/standardfields/city.json
668
- - spec/fixtures/standardfields/nearby.json
669
- - spec/fixtures/count.json
670
- - spec/fixtures/saved_searches/with_inactive_newsfeed.json
671
- - spec/fixtures/saved_searches/get_provided.json
672
- - spec/fixtures/saved_searches/get.json
673
- - spec/fixtures/saved_searches/with_newsfeed.json
674
- - spec/fixtures/saved_searches/new.json
675
- - spec/fixtures/saved_searches/post.json
676
- - spec/fixtures/saved_searches/update.json
677
- - spec/fixtures/saved_searches/without_newsfeed.json
678
- - spec/fixtures/idx_links/get.json
679
- - spec/fixtures/property_types/property_types.json
680
- - spec/fixtures/sharedlinks/success.json
681
- - spec/fixtures/activities/get.json
682
- - spec/unit/spark_api/authentication/base_auth_spec.rb
670
+ - spec/fixtures/listings/with_photos.json
671
+ - spec/fixtures/listings/constraints_with_pagination.json
672
+ - spec/fixtures/listings/shared_listing_get.json
673
+ - spec/fixtures/listings/put_reorder_photo.json
674
+ - spec/fixtures/listings/put_expiration_date.json
675
+ - spec/fixtures/listings/with_supplement.json
676
+ - spec/fixtures/listings/with_rental_calendar.json
677
+ - spec/fixtures/listings/shared_listing_post.json
678
+ - spec/fixtures/listings/floplans_index.json
679
+ - spec/fixtures/listings/with_permissions.json
680
+ - spec/fixtures/listings/with_documents.json
681
+ - spec/fixtures/listings/multiple.json
682
+ - spec/fixtures/session.json
683
+ - spec/unit/spark_api/multi_client_spec.rb
683
684
  - spec/unit/spark_api/authentication/api_auth_spec.rb
684
- - spec/unit/spark_api/authentication/oauth2_impl/grant_type_base_spec.rb
685
+ - spec/unit/spark_api/authentication/oauth2_spec.rb
686
+ - spec/unit/spark_api/authentication/base_auth_spec.rb
685
687
  - spec/unit/spark_api/authentication/oauth2_impl/single_session_provider_spec.rb
688
+ - spec/unit/spark_api/authentication/oauth2_impl/grant_type_base_spec.rb
686
689
  - spec/unit/spark_api/authentication/oauth2_impl/faraday_middleware_spec.rb
687
- - spec/unit/spark_api/authentication/oauth2_spec.rb
688
- - spec/unit/spark_api/options_hash_spec.rb
689
690
  - spec/unit/spark_api/paginate_spec.rb
690
- - spec/unit/spark_api/request_spec.rb
691
- - spec/unit/spark_api/authentication_spec.rb
692
691
  - spec/unit/spark_api/primary_array_spec.rb
693
692
  - spec/unit/spark_api/configuration_spec.rb
694
- - spec/unit/spark_api/models/property_types_spec.rb
695
- - spec/unit/spark_api/models/listing_spec.rb
696
- - spec/unit/spark_api/models/video_spec.rb
697
- - spec/unit/spark_api/models/sort_spec.rb
698
- - spec/unit/spark_api/models/finders_spec.rb
699
- - spec/unit/spark_api/models/document_spec.rb
700
- - spec/unit/spark_api/models/vow_account_spec.rb
701
- - spec/unit/spark_api/models/listing_meta_translations_spec.rb
702
- - spec/unit/spark_api/models/fields_spec.rb
703
- - spec/unit/spark_api/models/concerns/destroyable_spec.rb
704
- - spec/unit/spark_api/models/concerns/savable_spec.rb
705
- - spec/unit/spark_api/models/activity_spec.rb
693
+ - spec/unit/spark_api/configuration/yaml_spec.rb
694
+ - spec/unit/spark_api/authentication_spec.rb
695
+ - spec/unit/spark_api/request_spec.rb
696
+ - spec/unit/spark_api/options_hash_spec.rb
697
+ - spec/unit/spark_api/models/defaultable_spec.rb
698
+ - spec/unit/spark_api/models/portal_spec.rb
706
699
  - spec/unit/spark_api/models/rule_spec.rb
707
- - spec/unit/spark_api/models/listing_cart_spec.rb
700
+ - spec/unit/spark_api/models/fields_spec.rb
701
+ - spec/unit/spark_api/models/saved_search_spec.rb
702
+ - spec/unit/spark_api/models/vow_account_spec.rb
708
703
  - spec/unit/spark_api/models/account_report_spec.rb
709
- - spec/unit/spark_api/models/contact_spec.rb
710
- - spec/unit/spark_api/models/email_link_spec.rb
711
- - spec/unit/spark_api/models/notification_spec.rb
712
- - spec/unit/spark_api/models/open_house_spec.rb
713
- - spec/unit/spark_api/models/search_template/quick_search_spec.rb
704
+ - spec/unit/spark_api/models/floplan_spec.rb
705
+ - spec/unit/spark_api/models/listing_cart_spec.rb
706
+ - spec/unit/spark_api/models/message_spec.rb
707
+ - spec/unit/spark_api/models/news_feed_meta_spec.rb
708
+ - spec/unit/spark_api/models/rental_calendar_spec.rb
714
709
  - spec/unit/spark_api/models/constraint_spec.rb
715
- - spec/unit/spark_api/models/dirty_spec.rb
716
- - spec/unit/spark_api/models/note_spec.rb
717
- - spec/unit/spark_api/models/standard_fields_spec.rb
710
+ - spec/unit/spark_api/models/search_template/quick_search_spec.rb
711
+ - spec/unit/spark_api/models/newsfeed_spec.rb
712
+ - spec/unit/spark_api/models/tour_of_home_spec.rb
713
+ - spec/unit/spark_api/models/concerns/destroyable_spec.rb
714
+ - spec/unit/spark_api/models/concerns/savable_spec.rb
715
+ - spec/unit/spark_api/models/document_spec.rb
718
716
  - spec/unit/spark_api/models/connect_prefs_spec.rb
719
- - spec/unit/spark_api/models/message_spec.rb
720
- - spec/unit/spark_api/models/base_spec.rb
721
- - spec/unit/spark_api/models/floplan_spec.rb
717
+ - spec/unit/spark_api/models/standard_fields_spec.rb
718
+ - spec/unit/spark_api/models/shared_listing_spec.rb
719
+ - spec/unit/spark_api/models/notification_spec.rb
722
720
  - spec/unit/spark_api/models/subresource_spec.rb
723
- - spec/unit/spark_api/models/system_info_spec.rb
724
- - spec/unit/spark_api/models/virtual_tour_spec.rb
725
- - spec/unit/spark_api/models/tour_of_home_spec.rb
726
721
  - spec/unit/spark_api/models/shared_link_spec.rb
727
- - spec/unit/spark_api/models/photo_spec.rb
722
+ - spec/unit/spark_api/models/property_types_spec.rb
723
+ - spec/unit/spark_api/models/listing_meta_translations_spec.rb
724
+ - spec/unit/spark_api/models/virtual_tour_spec.rb
725
+ - spec/unit/spark_api/models/system_info_spec.rb
726
+ - spec/unit/spark_api/models/listing_spec.rb
727
+ - spec/unit/spark_api/models/base_spec.rb
728
728
  - spec/unit/spark_api/models/account_spec.rb
729
- - spec/unit/spark_api/models/saved_search_spec.rb
730
- - spec/unit/spark_api/models/defaultable_spec.rb
731
- - spec/unit/spark_api/models/news_feed_meta_spec.rb
732
- - spec/unit/spark_api/models/rental_calendar_spec.rb
733
- - spec/unit/spark_api/models/shared_listing_spec.rb
734
- - spec/unit/spark_api/models/newsfeed_spec.rb
735
- - spec/unit/spark_api/models/portal_spec.rb
736
- - spec/unit/spark_api/configuration/yaml_spec.rb
737
- - spec/unit/spark_api/multi_client_spec.rb
729
+ - spec/unit/spark_api/models/sort_spec.rb
730
+ - spec/unit/spark_api/models/video_spec.rb
731
+ - spec/unit/spark_api/models/photo_spec.rb
732
+ - spec/unit/spark_api/models/open_house_spec.rb
733
+ - spec/unit/spark_api/models/dirty_spec.rb
734
+ - spec/unit/spark_api/models/note_spec.rb
735
+ - spec/unit/spark_api/models/finders_spec.rb
736
+ - spec/unit/spark_api/models/activity_spec.rb
737
+ - spec/unit/spark_api/models/contact_spec.rb
738
+ - spec/unit/spark_api/models/email_link_spec.rb
738
739
  - spec/unit/spark_api/faraday_middleware_spec.rb
739
740
  - spec/unit/spark_api_spec.rb
740
741
  - spec/spec_helper.rb