metatron_ruby_client 0.0.1 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +28 -28
- data/config.json +1 -1
- data/docs/Asset.md +1 -1
- data/docs/AssetResultSet.md +1 -1
- data/docs/DefaultApi.md +159 -145
- data/docs/WorkAttributes.md +3 -1
- data/lib/metatron_ruby_client.rb +8 -3
- data/lib/metatron_ruby_client/api/default_api.rb +439 -241
- data/lib/metatron_ruby_client/api_client.rb +6 -2
- data/lib/metatron_ruby_client/api_error.rb +4 -2
- data/lib/metatron_ruby_client/configuration.rb +3 -3
- data/lib/metatron_ruby_client/models/asset.rb +45 -3
- data/lib/metatron_ruby_client/models/asset_data.rb +61 -2
- data/lib/metatron_ruby_client/models/asset_meta.rb +23 -0
- data/lib/metatron_ruby_client/models/asset_result_set.rb +60 -3
- data/lib/metatron_ruby_client/models/error.rb +61 -2
- data/lib/metatron_ruby_client/models/errors.rb +27 -2
- data/lib/metatron_ruby_client/models/item.rb +40 -0
- data/lib/metatron_ruby_client/models/item_data.rb +28 -2
- data/lib/metatron_ruby_client/models/item_result_set.rb +60 -2
- data/lib/metatron_ruby_client/models/links.rb +60 -2
- data/lib/metatron_ruby_client/models/manifestation.rb +40 -0
- data/lib/metatron_ruby_client/models/manifestation_attributes.rb +75 -2
- data/lib/metatron_ruby_client/models/manifestation_data.rb +78 -2
- data/lib/metatron_ruby_client/models/manifestation_relationships.rb +59 -2
- data/lib/metatron_ruby_client/models/manifestation_result_set.rb +62 -2
- data/lib/metatron_ruby_client/models/one_to_many_relationship.rb +60 -2
- data/lib/metatron_ruby_client/models/one_to_one_relationship.rb +60 -2
- data/lib/metatron_ruby_client/models/resource_data.rb +78 -2
- data/lib/metatron_ruby_client/models/resource_link.rb +45 -2
- data/lib/metatron_ruby_client/models/result_set_meta.rb +59 -2
- data/lib/metatron_ruby_client/models/work.rb +40 -0
- data/lib/metatron_ruby_client/models/work_attributes.rb +90 -10
- data/lib/metatron_ruby_client/models/work_data.rb +78 -2
- data/lib/metatron_ruby_client/models/work_relationships.rb +27 -2
- data/lib/metatron_ruby_client/models/work_result_set.rb +75 -2
- data/lib/metatron_ruby_client/version.rb +5 -3
- data/metatron_ruby_client-0.0.1.gem +0 -0
- data/spec/api/default_api_spec.rb +11 -0
- data/spec/models/work_attributes_spec.rb +21 -1
- data/stub-service/.idea/.name +1 -0
- data/stub-service/.idea/encodings.xml +5 -0
- data/stub-service/.idea/metatron-dummy-server.iml +11 -0
- data/stub-service/.idea/misc.xml +5 -0
- data/stub-service/.idea/modules.xml +9 -0
- data/stub-service/.idea/scopes/scope_settings.xml +5 -0
- data/stub-service/.idea/vcs.xml +7 -0
- data/stub-service/.idea/workspace.xml +534 -0
- metadata +32 -24
- data/swagger-codegen-cli.jar +0 -0
@@ -1,7 +1,9 @@
|
|
1
1
|
=begin
|
2
|
-
|
2
|
+
Metatron Server
|
3
3
|
|
4
|
-
|
4
|
+
A primitive modelling bibliographic metadata
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
5
7
|
|
6
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
7
9
|
|
@@ -84,7 +86,9 @@ module MetatronClient
|
|
84
86
|
query_params = opts[:query_params] || {}
|
85
87
|
form_params = opts[:form_params] || {}
|
86
88
|
|
89
|
+
|
87
90
|
update_params_for_auth! header_params, query_params, opts[:auth_names]
|
91
|
+
|
88
92
|
|
89
93
|
req_opts = {
|
90
94
|
:method => http_method,
|
@@ -92,9 +92,9 @@ module MetatronClient
|
|
92
92
|
attr_accessor :force_ending_format
|
93
93
|
|
94
94
|
def initialize
|
95
|
-
@scheme = '
|
96
|
-
@host = '
|
97
|
-
@base_path = ''
|
95
|
+
@scheme = 'http'
|
96
|
+
@host = 'localhost:3000'
|
97
|
+
@base_path = '/2'
|
98
98
|
@api_key = {}
|
99
99
|
@api_key_prefix = {}
|
100
100
|
@timeout = 0
|
@@ -1,7 +1,9 @@
|
|
1
1
|
=begin
|
2
|
-
|
2
|
+
Metatron Server
|
3
3
|
|
4
|
-
|
4
|
+
A primitive modelling bibliographic metadata
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
5
7
|
|
6
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
7
9
|
|
@@ -19,16 +21,22 @@ module MetatronClient
|
|
19
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
20
22
|
def self.attribute_map
|
21
23
|
{
|
24
|
+
|
22
25
|
:'meta' => :'meta',
|
26
|
+
|
23
27
|
:'data' => :'data'
|
28
|
+
|
24
29
|
}
|
25
30
|
end
|
26
31
|
|
27
32
|
# Attribute type mapping.
|
28
33
|
def self.swagger_types
|
29
34
|
{
|
30
|
-
|
35
|
+
|
36
|
+
:'meta' => :'AssetMeta',
|
37
|
+
|
31
38
|
:'data' => :'AssetData'
|
39
|
+
|
32
40
|
}
|
33
41
|
end
|
34
42
|
|
@@ -40,32 +48,66 @@ module MetatronClient
|
|
40
48
|
# convert string to symbol for hash key
|
41
49
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
42
50
|
|
51
|
+
|
43
52
|
if attributes.has_key?(:'meta')
|
53
|
+
|
54
|
+
|
44
55
|
self.meta = attributes[:'meta']
|
56
|
+
|
57
|
+
|
45
58
|
end
|
46
59
|
|
60
|
+
|
47
61
|
if attributes.has_key?(:'data')
|
62
|
+
|
63
|
+
|
48
64
|
self.data = attributes[:'data']
|
65
|
+
|
66
|
+
|
49
67
|
end
|
50
68
|
|
69
|
+
|
51
70
|
end
|
52
71
|
|
53
72
|
# Show invalid properties with the reasons. Usually used together with valid?
|
54
73
|
# @return Array for valid properies with the reasons
|
55
74
|
def list_invalid_properties
|
56
75
|
invalid_properties = Array.new
|
76
|
+
|
77
|
+
|
57
78
|
return invalid_properties
|
58
79
|
end
|
59
80
|
|
60
81
|
# Check to see if the all the properties in the model are valid
|
61
82
|
# @return true if the model is valid
|
62
83
|
def valid?
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
63
90
|
if @data.nil?
|
64
91
|
return false
|
65
92
|
end
|
66
93
|
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
67
98
|
end
|
68
99
|
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
69
111
|
# Checks equality by comparing each attribute.
|
70
112
|
# @param [Object] Object to be compared
|
71
113
|
def ==(o)
|
@@ -1,7 +1,9 @@
|
|
1
1
|
=begin
|
2
|
-
|
2
|
+
Metatron Server
|
3
3
|
|
4
|
-
|
4
|
+
A primitive modelling bibliographic metadata
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
5
7
|
|
6
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
7
9
|
|
@@ -21,18 +23,26 @@ module MetatronClient
|
|
21
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
24
|
def self.attribute_map
|
23
25
|
{
|
26
|
+
|
24
27
|
:'id' => :'id',
|
28
|
+
|
25
29
|
:'type' => :'type',
|
30
|
+
|
26
31
|
:'attributes' => :'attributes'
|
32
|
+
|
27
33
|
}
|
28
34
|
end
|
29
35
|
|
30
36
|
# Attribute type mapping.
|
31
37
|
def self.swagger_types
|
32
38
|
{
|
39
|
+
|
33
40
|
:'id' => :'String',
|
41
|
+
|
34
42
|
:'type' => :'String',
|
43
|
+
|
35
44
|
:'attributes' => :'Object'
|
45
|
+
|
36
46
|
}
|
37
47
|
end
|
38
48
|
|
@@ -44,40 +54,89 @@ module MetatronClient
|
|
44
54
|
# convert string to symbol for hash key
|
45
55
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
46
56
|
|
57
|
+
|
47
58
|
if attributes.has_key?(:'id')
|
59
|
+
|
60
|
+
|
48
61
|
self.id = attributes[:'id']
|
62
|
+
|
63
|
+
|
49
64
|
end
|
50
65
|
|
66
|
+
|
51
67
|
if attributes.has_key?(:'type')
|
68
|
+
|
69
|
+
|
52
70
|
self.type = attributes[:'type']
|
71
|
+
|
72
|
+
|
53
73
|
end
|
54
74
|
|
75
|
+
|
55
76
|
if attributes.has_key?(:'attributes')
|
77
|
+
|
78
|
+
|
56
79
|
self.attributes = attributes[:'attributes']
|
80
|
+
|
81
|
+
|
57
82
|
end
|
58
83
|
|
84
|
+
|
59
85
|
end
|
60
86
|
|
61
87
|
# Show invalid properties with the reasons. Usually used together with valid?
|
62
88
|
# @return Array for valid properies with the reasons
|
63
89
|
def list_invalid_properties
|
64
90
|
invalid_properties = Array.new
|
91
|
+
|
92
|
+
|
65
93
|
return invalid_properties
|
66
94
|
end
|
67
95
|
|
68
96
|
# Check to see if the all the properties in the model are valid
|
69
97
|
# @return true if the model is valid
|
70
98
|
def valid?
|
99
|
+
|
100
|
+
|
71
101
|
if @id.nil?
|
72
102
|
return false
|
73
103
|
end
|
74
104
|
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
75
110
|
if @type.nil?
|
76
111
|
return false
|
77
112
|
end
|
78
113
|
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
79
122
|
end
|
80
123
|
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
81
140
|
# Checks equality by comparing each attribute.
|
82
141
|
# @param [Object] Object to be compared
|
83
142
|
def ==(o)
|
@@ -19,14 +19,18 @@ module MetatronClient
|
|
19
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
20
20
|
def self.attribute_map
|
21
21
|
{
|
22
|
+
|
22
23
|
:'super_type' => :'super_type'
|
24
|
+
|
23
25
|
}
|
24
26
|
end
|
25
27
|
|
26
28
|
# Attribute type mapping.
|
27
29
|
def self.swagger_types
|
28
30
|
{
|
31
|
+
|
29
32
|
:'super_type' => :'String'
|
33
|
+
|
30
34
|
}
|
31
35
|
end
|
32
36
|
|
@@ -38,28 +42,44 @@ module MetatronClient
|
|
38
42
|
# convert string to symbol for hash key
|
39
43
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
40
44
|
|
45
|
+
|
41
46
|
if attributes.has_key?(:'super_type')
|
47
|
+
|
48
|
+
|
42
49
|
self.super_type = attributes[:'super_type']
|
50
|
+
|
51
|
+
|
43
52
|
end
|
44
53
|
|
54
|
+
|
45
55
|
end
|
46
56
|
|
47
57
|
# Show invalid properties with the reasons. Usually used together with valid?
|
48
58
|
# @return Array for valid properies with the reasons
|
49
59
|
def list_invalid_properties
|
50
60
|
invalid_properties = Array.new
|
61
|
+
|
62
|
+
|
51
63
|
return invalid_properties
|
52
64
|
end
|
53
65
|
|
54
66
|
# Check to see if the all the properties in the model are valid
|
55
67
|
# @return true if the model is valid
|
56
68
|
def valid?
|
69
|
+
|
70
|
+
|
71
|
+
|
57
72
|
allowed_values = ["assets"]
|
58
73
|
if @super_type && !allowed_values.include?(@super_type)
|
59
74
|
return false
|
60
75
|
end
|
76
|
+
|
77
|
+
|
78
|
+
|
61
79
|
end
|
62
80
|
|
81
|
+
|
82
|
+
|
63
83
|
# Custom attribute writer method checking allowed values (enum).
|
64
84
|
# @param [Object] super_type Object to be assigned
|
65
85
|
def super_type=(super_type)
|
@@ -70,6 +90,9 @@ module MetatronClient
|
|
70
90
|
@super_type = super_type
|
71
91
|
end
|
72
92
|
|
93
|
+
|
94
|
+
|
95
|
+
|
73
96
|
# Checks equality by comparing each attribute.
|
74
97
|
# @param [Object] Object to be compared
|
75
98
|
def ==(o)
|
@@ -1,7 +1,9 @@
|
|
1
1
|
=begin
|
2
|
-
|
2
|
+
Metatron Server
|
3
3
|
|
4
|
-
|
4
|
+
A primitive modelling bibliographic metadata
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
5
7
|
|
6
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
7
9
|
|
@@ -21,18 +23,26 @@ module MetatronClient
|
|
21
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
24
|
def self.attribute_map
|
23
25
|
{
|
26
|
+
|
24
27
|
:'links' => :'links',
|
28
|
+
|
25
29
|
:'meta' => :'meta',
|
30
|
+
|
26
31
|
:'data' => :'data'
|
32
|
+
|
27
33
|
}
|
28
34
|
end
|
29
35
|
|
30
36
|
# Attribute type mapping.
|
31
37
|
def self.swagger_types
|
32
38
|
{
|
39
|
+
|
33
40
|
:'links' => :'Links',
|
34
|
-
|
41
|
+
|
42
|
+
:'meta' => :'AssetMeta',
|
43
|
+
|
35
44
|
:'data' => :'Array<AssetData>'
|
45
|
+
|
36
46
|
}
|
37
47
|
end
|
38
48
|
|
@@ -44,34 +54,81 @@ module MetatronClient
|
|
44
54
|
# convert string to symbol for hash key
|
45
55
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
46
56
|
|
57
|
+
|
47
58
|
if attributes.has_key?(:'links')
|
59
|
+
|
60
|
+
|
48
61
|
self.links = attributes[:'links']
|
62
|
+
|
63
|
+
|
49
64
|
end
|
50
65
|
|
66
|
+
|
51
67
|
if attributes.has_key?(:'meta')
|
68
|
+
|
69
|
+
|
52
70
|
self.meta = attributes[:'meta']
|
71
|
+
|
72
|
+
|
53
73
|
end
|
54
74
|
|
75
|
+
|
55
76
|
if attributes.has_key?(:'data')
|
77
|
+
|
56
78
|
if (value = attributes[:'data']).is_a?(Array)
|
57
79
|
self.data = value
|
58
80
|
end
|
81
|
+
|
82
|
+
|
83
|
+
|
59
84
|
end
|
60
85
|
|
86
|
+
|
61
87
|
end
|
62
88
|
|
63
89
|
# Show invalid properties with the reasons. Usually used together with valid?
|
64
90
|
# @return Array for valid properies with the reasons
|
65
91
|
def list_invalid_properties
|
66
92
|
invalid_properties = Array.new
|
93
|
+
|
94
|
+
|
67
95
|
return invalid_properties
|
68
96
|
end
|
69
97
|
|
70
98
|
# Check to see if the all the properties in the model are valid
|
71
99
|
# @return true if the model is valid
|
72
100
|
def valid?
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
73
114
|
end
|
74
115
|
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
75
132
|
# Checks equality by comparing each attribute.
|
76
133
|
# @param [Object] Object to be compared
|
77
134
|
def ==(o)
|