spark_api 1.4.22 → 1.4.23
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,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDI5NGFmMDQzZjQxODIxNmVlOGUyMDc2YzE2N2QzZmFkZjZkNDM3OA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDcwMTNjZmZjNWIyZjcyYWUwZTVlYWU2NTZjYzc5N2NjODE2MWRmMg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjliODg2M2JiZGQ1ZjM5ZGQ0ZDJlZTk5Y2FmZjI5YzQ5NDgwOTQ5NjBmZmJh
|
10
|
+
Zjg1NmZkOTM3MjFkYTJiOTczZDljMGE5N2Q0YmY5OGY1YmUxNzIxN2I5NWQz
|
11
|
+
NzcyNzA5Nzc0YWQ4MDFhMjQ4YTM0NDQ3OTRhMjVmOGY5YWUxYmY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODMzODY1ZGE1NzRmNzQ1MTU2MTk1ZDJkMjlkNGYyZjRmZjA4ZjVjNDlhNDVm
|
14
|
+
ZWMxZWU0MGRkM2NiYjE2YThmZmY5NTlhY2RkMjM0YWI3M2U3NjFkMGE2YWY1
|
15
|
+
YWU3YTA2MjE3NGY3MDQwN2Y3MDRmNWQ2MzkwNTQwOWFiYjI5ZjQ=
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.4.
|
1
|
+
1.4.23
|
data/lib/spark_api/models.rb
CHANGED
@@ -22,6 +22,7 @@ require 'spark_api/models/idx_link'
|
|
22
22
|
require 'spark_api/models/incomplete_listing'
|
23
23
|
require 'spark_api/models/listing'
|
24
24
|
require 'spark_api/models/listing_cart'
|
25
|
+
require 'spark_api/models/listing_meta_translations'
|
25
26
|
require 'spark_api/models/market_statistics'
|
26
27
|
require 'spark_api/models/message'
|
27
28
|
require 'spark_api/models/news_feed_meta'
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module SparkApi
|
2
|
+
module Models
|
3
|
+
class ListingMetaTranslations < Base
|
4
|
+
|
5
|
+
def self.for_property_type(pt, options={})
|
6
|
+
results = connection.get("/flexmls/propertytypes/#{pt}/translations", options)
|
7
|
+
if results.any?
|
8
|
+
collect(results).first
|
9
|
+
else
|
10
|
+
new(StandardFields: {}, CustomFields: {})
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
{
|
2
|
+
"D": {
|
3
|
+
"Success": true,
|
4
|
+
"Results": [
|
5
|
+
{
|
6
|
+
"StandardFields": {
|
7
|
+
"ParkingTotal": {
|
8
|
+
"FlexmlsTableName": "feature",
|
9
|
+
"FlexmlsFieldId": "# Parking Spaces",
|
10
|
+
"FlexmlsDisplayId": "20010531180858445022000000",
|
11
|
+
"FlexmlsDisplayType": "N",
|
12
|
+
"FlexmlsGroupId": "GA",
|
13
|
+
"SparkDataType": "Decimal"
|
14
|
+
},
|
15
|
+
"VOWAddressDisplayYN": {
|
16
|
+
"FlexmlsTableName": "list_extra",
|
17
|
+
"FlexmlsFieldId": "pub_addr",
|
18
|
+
"FlexmlsDisplayId": null,
|
19
|
+
"FlexmlsDisplayType": "S",
|
20
|
+
"FlexmlsGroupId": null,
|
21
|
+
"SparkDataType": "Boolean"
|
22
|
+
}
|
23
|
+
},
|
24
|
+
"CustomFields": {
|
25
|
+
"Garage": {
|
26
|
+
"# Parking Spaces": {
|
27
|
+
"FlexmlsTableName": "feature",
|
28
|
+
"FlexmlsFieldId": "# Parking Spaces",
|
29
|
+
"FlexmlsDisplayId": "20010531180858445022000000",
|
30
|
+
"FlexmlsDisplayType": "N",
|
31
|
+
"FlexmlsGroupId": "GA",
|
32
|
+
"SparkDataType": "Decimal"
|
33
|
+
},
|
34
|
+
"# Stalls Attached": {
|
35
|
+
"FlexmlsTableName": "feature",
|
36
|
+
"FlexmlsFieldId": "# Stalls Attached",
|
37
|
+
"FlexmlsDisplayId": "20010531180812103075000000",
|
38
|
+
"FlexmlsDisplayType": "N",
|
39
|
+
"FlexmlsGroupId": "GA",
|
40
|
+
"SparkDataType": "Decimal"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
]
|
46
|
+
}
|
47
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ListingMetaTranslations do
|
4
|
+
|
5
|
+
before(:each) do
|
6
|
+
stub_auth_request
|
7
|
+
end
|
8
|
+
|
9
|
+
context "/flexmls/propertytypes/<PropertyType.MlsCode>/translations", :support do
|
10
|
+
|
11
|
+
on_get_it "gets all translations" do
|
12
|
+
stub_api_get("/flexmls/propertytypes/A/translations", 'listing_meta_translations/get.json')
|
13
|
+
|
14
|
+
translations = ListingMetaTranslations.for_property_type('A')
|
15
|
+
translations.should be_an(ListingMetaTranslations)
|
16
|
+
translations.StandardFields.should be_an(Hash)
|
17
|
+
translations.CustomFields.should be_an(Hash)
|
18
|
+
end
|
19
|
+
|
20
|
+
on_get_it "doesn't explode if there are no results" do
|
21
|
+
stub_api_get("/flexmls/propertytypes/A/translations", 'no_results.json')
|
22
|
+
|
23
|
+
translations = ListingMetaTranslations.for_property_type('A')
|
24
|
+
translations.should be_an(ListingMetaTranslations)
|
25
|
+
translations.StandardFields.should be_an(Hash)
|
26
|
+
translations.CustomFields.should be_an(Hash)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
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.4.
|
4
|
+
version: 1.4.23
|
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: 2018-06-
|
12
|
+
date: 2018-06-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -340,6 +340,7 @@ files:
|
|
340
340
|
- lib/spark_api/models/incomplete_listing.rb
|
341
341
|
- lib/spark_api/models/listing.rb
|
342
342
|
- lib/spark_api/models/listing_cart.rb
|
343
|
+
- lib/spark_api/models/listing_meta_translations.rb
|
343
344
|
- lib/spark_api/models/market_statistics.rb
|
344
345
|
- lib/spark_api/models/message.rb
|
345
346
|
- lib/spark_api/models/news_feed_meta.rb
|
@@ -435,6 +436,7 @@ files:
|
|
435
436
|
- spec/fixtures/listing_carts/put_ids.json
|
436
437
|
- spec/fixtures/listing_carts/put_name.json
|
437
438
|
- spec/fixtures/listing_carts/remove_listing.json
|
439
|
+
- spec/fixtures/listing_meta_translations/get.json
|
438
440
|
- spec/fixtures/listings/constraints.json
|
439
441
|
- spec/fixtures/listings/constraints_with_pagination.json
|
440
442
|
- spec/fixtures/listings/document_index.json
|
@@ -546,6 +548,7 @@ files:
|
|
546
548
|
- spec/unit/spark_api/models/fields_spec.rb
|
547
549
|
- spec/unit/spark_api/models/finders_spec.rb
|
548
550
|
- spec/unit/spark_api/models/listing_cart_spec.rb
|
551
|
+
- spec/unit/spark_api/models/listing_meta_translations_spec.rb
|
549
552
|
- spec/unit/spark_api/models/listing_spec.rb
|
550
553
|
- spec/unit/spark_api/models/message_spec.rb
|
551
554
|
- spec/unit/spark_api/models/news_feed_meta_spec.rb
|
@@ -602,6 +605,7 @@ specification_version: 4
|
|
602
605
|
summary: A library for interacting with the Spark web services.
|
603
606
|
test_files:
|
604
607
|
- spec/fixtures/generic_delete.json
|
608
|
+
- spec/fixtures/listing_meta_translations/get.json
|
605
609
|
- spec/fixtures/oauth2/refresh_body.json
|
606
610
|
- spec/fixtures/oauth2/access.json
|
607
611
|
- spec/fixtures/oauth2/authorization_code_body.json
|
@@ -767,6 +771,7 @@ test_files:
|
|
767
771
|
- spec/unit/spark_api/models/shared_listing_spec.rb
|
768
772
|
- spec/unit/spark_api/models/finders_spec.rb
|
769
773
|
- spec/unit/spark_api/models/account_spec.rb
|
774
|
+
- spec/unit/spark_api/models/listing_meta_translations_spec.rb
|
770
775
|
- spec/unit/spark_api/models/listing_spec.rb
|
771
776
|
- spec/unit/spark_api/models/video_spec.rb
|
772
777
|
- spec/unit/spark_api/models/shared_link_spec.rb
|