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
|
|
@@ -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
|
:'_self' => :'self',
|
28
|
+
|
25
29
|
:'_next' => :'next',
|
30
|
+
|
26
31
|
:'previous' => :'previous'
|
32
|
+
|
27
33
|
}
|
28
34
|
end
|
29
35
|
|
30
36
|
# Attribute type mapping.
|
31
37
|
def self.swagger_types
|
32
38
|
{
|
39
|
+
|
33
40
|
:'_self' => :'String',
|
41
|
+
|
34
42
|
:'_next' => :'String',
|
43
|
+
|
35
44
|
:'previous' => :'String'
|
45
|
+
|
36
46
|
}
|
37
47
|
end
|
38
48
|
|
@@ -44,36 +54,84 @@ 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?(:'self')
|
59
|
+
|
60
|
+
|
48
61
|
self._self = attributes[:'self']
|
62
|
+
|
63
|
+
|
49
64
|
end
|
50
65
|
|
66
|
+
|
51
67
|
if attributes.has_key?(:'next')
|
68
|
+
|
69
|
+
|
52
70
|
self._next = attributes[:'next']
|
71
|
+
|
72
|
+
|
53
73
|
end
|
54
74
|
|
75
|
+
|
55
76
|
if attributes.has_key?(:'previous')
|
77
|
+
|
78
|
+
|
56
79
|
self.previous = attributes[:'previous']
|
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 @_self.nil?
|
72
102
|
return false
|
73
103
|
end
|
74
104
|
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
75
117
|
end
|
76
118
|
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
77
135
|
# Checks equality by comparing each attribute.
|
78
136
|
# @param [Object] Object to be compared
|
79
137
|
def ==(o)
|
@@ -21,16 +21,22 @@ module MetatronClient
|
|
21
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
22
|
def self.attribute_map
|
23
23
|
{
|
24
|
+
|
24
25
|
:'links' => :'links',
|
26
|
+
|
25
27
|
:'data' => :'data'
|
28
|
+
|
26
29
|
}
|
27
30
|
end
|
28
31
|
|
29
32
|
# Attribute type mapping.
|
30
33
|
def self.swagger_types
|
31
34
|
{
|
35
|
+
|
32
36
|
:'links' => :'Links',
|
37
|
+
|
33
38
|
:'data' => :'ManifestationData'
|
39
|
+
|
34
40
|
}
|
35
41
|
end
|
36
42
|
|
@@ -42,32 +48,66 @@ module MetatronClient
|
|
42
48
|
# convert string to symbol for hash key
|
43
49
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
44
50
|
|
51
|
+
|
45
52
|
if attributes.has_key?(:'links')
|
53
|
+
|
54
|
+
|
46
55
|
self.links = attributes[:'links']
|
56
|
+
|
57
|
+
|
47
58
|
end
|
48
59
|
|
60
|
+
|
49
61
|
if attributes.has_key?(:'data')
|
62
|
+
|
63
|
+
|
50
64
|
self.data = attributes[:'data']
|
65
|
+
|
66
|
+
|
51
67
|
end
|
52
68
|
|
69
|
+
|
53
70
|
end
|
54
71
|
|
55
72
|
# Show invalid properties with the reasons. Usually used together with valid?
|
56
73
|
# @return Array for valid properies with the reasons
|
57
74
|
def list_invalid_properties
|
58
75
|
invalid_properties = Array.new
|
76
|
+
|
77
|
+
|
59
78
|
return invalid_properties
|
60
79
|
end
|
61
80
|
|
62
81
|
# Check to see if the all the properties in the model are valid
|
63
82
|
# @return true if the model is valid
|
64
83
|
def valid?
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
65
90
|
if @data.nil?
|
66
91
|
return false
|
67
92
|
end
|
68
93
|
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
69
98
|
end
|
70
99
|
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
71
111
|
# Checks equality by comparing each attribute.
|
72
112
|
# @param [Object] Object to be compared
|
73
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
|
|
@@ -23,20 +25,30 @@ module MetatronClient
|
|
23
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
24
26
|
def self.attribute_map
|
25
27
|
{
|
28
|
+
|
26
29
|
:'format' => :'format',
|
30
|
+
|
27
31
|
:'identifiers' => :'identifiers',
|
32
|
+
|
28
33
|
:'place_of_publication' => :'place_of_publication',
|
34
|
+
|
29
35
|
:'publishing_status' => :'publishing_status'
|
36
|
+
|
30
37
|
}
|
31
38
|
end
|
32
39
|
|
33
40
|
# Attribute type mapping.
|
34
41
|
def self.swagger_types
|
35
42
|
{
|
43
|
+
|
36
44
|
:'format' => :'String',
|
45
|
+
|
37
46
|
:'identifiers' => :'Object',
|
47
|
+
|
38
48
|
:'place_of_publication' => :'String',
|
49
|
+
|
39
50
|
:'publishing_status' => :'String'
|
51
|
+
|
40
52
|
}
|
41
53
|
end
|
42
54
|
|
@@ -48,36 +60,97 @@ module MetatronClient
|
|
48
60
|
# convert string to symbol for hash key
|
49
61
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
50
62
|
|
63
|
+
|
51
64
|
if attributes.has_key?(:'format')
|
65
|
+
|
66
|
+
|
52
67
|
self.format = attributes[:'format']
|
68
|
+
|
69
|
+
|
53
70
|
end
|
54
71
|
|
72
|
+
|
55
73
|
if attributes.has_key?(:'identifiers')
|
74
|
+
|
75
|
+
|
56
76
|
self.identifiers = attributes[:'identifiers']
|
77
|
+
|
78
|
+
|
57
79
|
end
|
58
80
|
|
81
|
+
|
59
82
|
if attributes.has_key?(:'place_of_publication')
|
83
|
+
|
84
|
+
|
60
85
|
self.place_of_publication = attributes[:'place_of_publication']
|
86
|
+
|
87
|
+
|
61
88
|
end
|
62
89
|
|
90
|
+
|
63
91
|
if attributes.has_key?(:'publishing_status')
|
92
|
+
|
93
|
+
|
64
94
|
self.publishing_status = attributes[:'publishing_status']
|
95
|
+
|
96
|
+
|
65
97
|
end
|
66
98
|
|
99
|
+
|
67
100
|
end
|
68
101
|
|
69
102
|
# Show invalid properties with the reasons. Usually used together with valid?
|
70
103
|
# @return Array for valid properies with the reasons
|
71
104
|
def list_invalid_properties
|
72
105
|
invalid_properties = Array.new
|
106
|
+
|
107
|
+
|
73
108
|
return invalid_properties
|
74
109
|
end
|
75
110
|
|
76
111
|
# Check to see if the all the properties in the model are valid
|
77
112
|
# @return true if the model is valid
|
78
113
|
def valid?
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
79
131
|
end
|
80
132
|
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
81
154
|
# Checks equality by comparing each attribute.
|
82
155
|
# @param [Object] Object to be compared
|
83
156
|
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
|
|
@@ -23,20 +25,30 @@ module MetatronClient
|
|
23
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
24
26
|
def self.attribute_map
|
25
27
|
{
|
28
|
+
|
26
29
|
:'id' => :'id',
|
30
|
+
|
27
31
|
:'type' => :'type',
|
32
|
+
|
28
33
|
:'attributes' => :'attributes',
|
34
|
+
|
29
35
|
:'relationships' => :'relationships'
|
36
|
+
|
30
37
|
}
|
31
38
|
end
|
32
39
|
|
33
40
|
# Attribute type mapping.
|
34
41
|
def self.swagger_types
|
35
42
|
{
|
43
|
+
|
36
44
|
:'id' => :'String',
|
45
|
+
|
37
46
|
:'type' => :'String',
|
47
|
+
|
38
48
|
:'attributes' => :'ManifestationAttributes',
|
49
|
+
|
39
50
|
:'relationships' => :'ManifestationRelationships'
|
51
|
+
|
40
52
|
}
|
41
53
|
end
|
42
54
|
|
@@ -48,52 +60,103 @@ module MetatronClient
|
|
48
60
|
# convert string to symbol for hash key
|
49
61
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
50
62
|
|
63
|
+
|
51
64
|
if attributes.has_key?(:'id')
|
65
|
+
|
66
|
+
|
52
67
|
self.id = attributes[:'id']
|
68
|
+
|
69
|
+
|
53
70
|
end
|
54
71
|
|
72
|
+
|
55
73
|
if attributes.has_key?(:'type')
|
74
|
+
|
75
|
+
|
56
76
|
self.type = attributes[:'type']
|
77
|
+
|
78
|
+
|
57
79
|
end
|
58
80
|
|
81
|
+
|
59
82
|
if attributes.has_key?(:'attributes')
|
83
|
+
|
84
|
+
|
60
85
|
self.attributes = attributes[:'attributes']
|
86
|
+
|
87
|
+
|
61
88
|
end
|
62
89
|
|
90
|
+
|
63
91
|
if attributes.has_key?(:'relationships')
|
92
|
+
|
93
|
+
|
64
94
|
self.relationships = attributes[:'relationships']
|
95
|
+
|
96
|
+
|
65
97
|
end
|
66
98
|
|
99
|
+
|
67
100
|
end
|
68
101
|
|
69
102
|
# Show invalid properties with the reasons. Usually used together with valid?
|
70
103
|
# @return Array for valid properies with the reasons
|
71
104
|
def list_invalid_properties
|
72
105
|
invalid_properties = Array.new
|
106
|
+
|
107
|
+
|
73
108
|
return invalid_properties
|
74
109
|
end
|
75
110
|
|
76
111
|
# Check to see if the all the properties in the model are valid
|
77
112
|
# @return true if the model is valid
|
78
113
|
def valid?
|
114
|
+
|
115
|
+
|
79
116
|
if @id.nil?
|
80
117
|
return false
|
81
118
|
end
|
82
119
|
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
83
125
|
if @type.nil?
|
84
126
|
return false
|
85
127
|
end
|
86
128
|
|
129
|
+
|
130
|
+
|
87
131
|
allowed_values = ["manifestations"]
|
88
132
|
if @type && !allowed_values.include?(@type)
|
89
133
|
return false
|
90
134
|
end
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
91
139
|
if @attributes.nil?
|
92
140
|
return false
|
93
141
|
end
|
94
142
|
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
95
151
|
end
|
96
152
|
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
97
160
|
# Custom attribute writer method checking allowed values (enum).
|
98
161
|
# @param [Object] type Object to be assigned
|
99
162
|
def type=(type)
|
@@ -104,6 +167,19 @@ module MetatronClient
|
|
104
167
|
@type = type
|
105
168
|
end
|
106
169
|
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
107
183
|
# Checks equality by comparing each attribute.
|
108
184
|
# @param [Object] Object to be compared
|
109
185
|
def ==(o)
|