laximo 0.3.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.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/Gemfile +4 -0
- data/LICENSE.BSD +24 -0
- data/README.md +87 -0
- data/laximo.gemspec +26 -0
- data/lib/laximo.rb +38 -0
- data/lib/laximo/am.rb +113 -0
- data/lib/laximo/defaults.rb +10 -0
- data/lib/laximo/oem.rb +398 -0
- data/lib/laximo/options.rb +92 -0
- data/lib/laximo/query.rb +201 -0
- data/lib/laximo/request.rb +78 -0
- data/lib/laximo/respond.rb +106 -0
- data/lib/laximo/respond/find_detail.rb +42 -0
- data/lib/laximo/respond/find_oem.rb +42 -0
- data/lib/laximo/respond/find_oem_correction.rb +42 -0
- data/lib/laximo/respond/find_replacements.rb +20 -0
- data/lib/laximo/respond/find_vehicle_by_frame.rb +16 -0
- data/lib/laximo/respond/find_vehicle_by_vin.rb +16 -0
- data/lib/laximo/respond/find_vehicle_by_wizard.rb +16 -0
- data/lib/laximo/respond/find_vehicle_by_wizard2.rb +16 -0
- data/lib/laximo/respond/get_catalog_info.rb +16 -0
- data/lib/laximo/respond/get_filter_by_detail.rb +16 -0
- data/lib/laximo/respond/get_filter_by_unit.rb +16 -0
- data/lib/laximo/respond/get_unit_info.rb +16 -0
- data/lib/laximo/respond/get_vehicle_info.rb +16 -0
- data/lib/laximo/respond/get_wizard.rb +16 -0
- data/lib/laximo/respond/get_wizard2.rb +16 -0
- data/lib/laximo/respond/get_wizard_next_step2.rb +16 -0
- data/lib/laximo/respond/list_catalogs.rb +16 -0
- data/lib/laximo/respond/list_categories.rb +16 -0
- data/lib/laximo/respond/list_detail_by_unit.rb +16 -0
- data/lib/laximo/respond/list_image_map_by_unit.rb +16 -0
- data/lib/laximo/respond/list_manufacturer.rb +20 -0
- data/lib/laximo/respond/list_quick_detail.rb +16 -0
- data/lib/laximo/respond/list_quick_group.rb +16 -0
- data/lib/laximo/respond/list_units.rb +16 -0
- data/lib/laximo/respond/manufacturer_info.rb +20 -0
- data/lib/laximo/version.rb +6 -0
- metadata +97 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
module Laximo
|
|
3
|
+
|
|
4
|
+
module Respond
|
|
5
|
+
|
|
6
|
+
class FindDetail < Laximo::Respond::Base
|
|
7
|
+
|
|
8
|
+
def parsing_result(str)
|
|
9
|
+
|
|
10
|
+
str.xpath('//FindDetails/detail').inject([]) { |arr, node|
|
|
11
|
+
|
|
12
|
+
h = attrs_to_hash(node)
|
|
13
|
+
|
|
14
|
+
h[:images] = node.xpath('./images/image').inject([]) { |arr1, n1|
|
|
15
|
+
arr1 << attrs_to_hash(n1)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
h[:properties] = node.xpath('./properties/property').inject([]) { |arr1, n1|
|
|
19
|
+
arr1 << attrs_to_hash(n1)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
h[:replacements] = node.xpath('./replacements/replacement').inject([]) { |arr1, n1|
|
|
23
|
+
|
|
24
|
+
h1 = attrs_to_hash(n1)
|
|
25
|
+
h2 = attrs_to_hash(n1.children[0])
|
|
26
|
+
h1.merge!(h2)
|
|
27
|
+
|
|
28
|
+
arr1 << h1
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
arr << h
|
|
33
|
+
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
end # parsing_result
|
|
37
|
+
|
|
38
|
+
end # FindDetail
|
|
39
|
+
|
|
40
|
+
end # Respond
|
|
41
|
+
|
|
42
|
+
end # Laximo
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
module Laximo
|
|
3
|
+
|
|
4
|
+
module Respond
|
|
5
|
+
|
|
6
|
+
class FindOem < Laximo::Respond::Base
|
|
7
|
+
|
|
8
|
+
def parsing_result(str)
|
|
9
|
+
|
|
10
|
+
str.xpath('//FindOEM/detail').inject([]) { |arr, node|
|
|
11
|
+
|
|
12
|
+
h = attrs_to_hash(node)
|
|
13
|
+
|
|
14
|
+
h[:images] = node.xpath('./images/image').inject([]) { |arr1, n1|
|
|
15
|
+
arr1 << attrs_to_hash(n1)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
h[:properties] = node.xpath('./properties/property').inject([]) { |arr1, n1|
|
|
19
|
+
arr1 << attrs_to_hash(n1)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
h[:replacements] = node.xpath('./replacements/replacement').inject([]) { |arr1, n1|
|
|
23
|
+
|
|
24
|
+
h1 = attrs_to_hash(n1)
|
|
25
|
+
h2 = attrs_to_hash(n1.children[0])
|
|
26
|
+
h1.merge!(h2)
|
|
27
|
+
|
|
28
|
+
arr1 << h1
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
arr << h
|
|
33
|
+
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
end # parsing_result
|
|
37
|
+
|
|
38
|
+
end # FindOem
|
|
39
|
+
|
|
40
|
+
end # Respond
|
|
41
|
+
|
|
42
|
+
end # Laximo
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
module Laximo
|
|
3
|
+
|
|
4
|
+
module Respond
|
|
5
|
+
|
|
6
|
+
class FindOemCorrection < Laximo::Respond::Base
|
|
7
|
+
|
|
8
|
+
def parsing_result(str)
|
|
9
|
+
|
|
10
|
+
str.xpath('//FindOEMCorrection/detail').inject([]) { |arr, node|
|
|
11
|
+
|
|
12
|
+
h = attrs_to_hash(node)
|
|
13
|
+
|
|
14
|
+
h[:images] = node.xpath('./images/image').inject([]) { |arr1, n1|
|
|
15
|
+
arr1 << attrs_to_hash(n1)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
h[:properties] = node.xpath('./properties/property').inject([]) { |arr1, n1|
|
|
19
|
+
arr1 << attrs_to_hash(n1)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
h[:replacements] = node.xpath('./replacements/replacement').inject([]) { |arr1, n1|
|
|
23
|
+
|
|
24
|
+
h1 = attrs_to_hash(n1)
|
|
25
|
+
h2 = attrs_to_hash(n1.children[0])
|
|
26
|
+
h1.merge!(h2)
|
|
27
|
+
|
|
28
|
+
arr1 << h1
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
arr << h
|
|
33
|
+
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
end # parsing_result
|
|
37
|
+
|
|
38
|
+
end # FindOemCorrection
|
|
39
|
+
|
|
40
|
+
end # Respond
|
|
41
|
+
|
|
42
|
+
end # Laximo
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
module Laximo
|
|
3
|
+
|
|
4
|
+
module Respond
|
|
5
|
+
|
|
6
|
+
class FindReplacements < Laximo::Respond::Base
|
|
7
|
+
|
|
8
|
+
def parsing_result(str)
|
|
9
|
+
|
|
10
|
+
str.xpath('//FindReplacements/row').inject([]) { |arr, node|
|
|
11
|
+
arr << attrs_to_hash(node)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
end # parsing_result
|
|
15
|
+
|
|
16
|
+
end # FindReplacements
|
|
17
|
+
|
|
18
|
+
end # Respond
|
|
19
|
+
|
|
20
|
+
end # Laximo
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
module Laximo
|
|
3
|
+
|
|
4
|
+
module Respond
|
|
5
|
+
|
|
6
|
+
class ListManufacturer < Laximo::Respond::Base
|
|
7
|
+
|
|
8
|
+
def parsing_result(str)
|
|
9
|
+
|
|
10
|
+
str.xpath('//ListManufacturer/row').inject([]) { |arr, node|
|
|
11
|
+
arr << attrs_to_hash(node)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
end # parsing_result
|
|
15
|
+
|
|
16
|
+
end # ListManufacturer
|
|
17
|
+
|
|
18
|
+
end # Respond
|
|
19
|
+
|
|
20
|
+
end # Laximo
|