immobilienscout 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/README.md +7 -0
- data/lib/immobilienscout/api/property.rb +19 -0
- data/lib/immobilienscout/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e8f0abea819ff2c7b1d778f3bf030a43144f64a6fe7e8798f0784ccd8fab08f
|
4
|
+
data.tar.gz: ba8baca86a75ea2616ad5d89c6f5d75705dedd46252e4be2c765c7b508dc2fd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b26da3ad4e1b863d7786878832c7fac80435087787c395f611a4e7e9e4765a29fcacaf14ce2d244307561e16c8f50b62cdbf4e4c2dde7248b60cb51e04b6de3e
|
7
|
+
data.tar.gz: 8226a4ed2e777a9a0537fd07c28212b8734be7786ce6cbce3b931f1f0c2cf2a10fc21f9bc49e59bc212da252e2b47b8d0fa32068157bace45db1603f864b0122
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -32,6 +32,13 @@ Immobilienscout::API::Property.create({params})
|
|
32
32
|
Immobilienscout::API::Property.publish({params})
|
33
33
|
```
|
34
34
|
|
35
|
+
- Update property
|
36
|
+
```ruby
|
37
|
+
Immobilienscout::API::Property.update(is24_id, {params})
|
38
|
+
```
|
39
|
+
|
40
|
+
_Note: You have to send all attributes, also if only one attribute has changed. Otherwise Immobilienscout cannot interpret if a missing attribute should be filled in with NULL or not._
|
41
|
+
|
35
42
|
- Delete property
|
36
43
|
```ruby
|
37
44
|
Immobilienscout::API::Property.destroy(is24_id)
|
@@ -8,6 +8,14 @@ module Immobilienscout
|
|
8
8
|
execute_post_request(create_url, params)
|
9
9
|
end
|
10
10
|
|
11
|
+
def update(is24_id, params)
|
12
|
+
raise ArgumentError unless params.present?
|
13
|
+
|
14
|
+
update_url = update_url(is24_id)
|
15
|
+
|
16
|
+
execute_put_request(update_url, params)
|
17
|
+
end
|
18
|
+
|
11
19
|
def publish(params)
|
12
20
|
raise ArgumentError unless params.present?
|
13
21
|
|
@@ -39,6 +47,13 @@ module Immobilienscout
|
|
39
47
|
parsed_response
|
40
48
|
end
|
41
49
|
|
50
|
+
def execute_put_request(url, params)
|
51
|
+
parsed_response = Immobilienscout::Request.new(url, params).put
|
52
|
+
raise Immobilienscout::Errors::InvalidRequest, parsed_response.messages.map(&:messages) unless parsed_response.success?
|
53
|
+
|
54
|
+
parsed_response
|
55
|
+
end
|
56
|
+
|
42
57
|
def execute_delete_request(url)
|
43
58
|
parsed_response = Immobilienscout::Request.new(url).delete
|
44
59
|
raise Immobilienscout::Errors::InvalidRequest, parsed_response.messages.map(&:messages) unless parsed_response.success?
|
@@ -57,6 +72,10 @@ module Immobilienscout
|
|
57
72
|
"#{Immobilienscout::Client.api_url}/restapi/api/offer/v1.0/user/me/realestate"
|
58
73
|
end
|
59
74
|
|
75
|
+
def update_url(is24_id)
|
76
|
+
"#{Immobilienscout::Client.api_url}/restapi/api/offer/v1.0/user/me/realestate/#{is24_id}"
|
77
|
+
end
|
78
|
+
|
60
79
|
def publish_url
|
61
80
|
"#{Immobilienscout::Client.api_url}/restapi/api/offer/v1.0/publish"
|
62
81
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: immobilienscout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Homeday GmbH
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|