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.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -28
  3. data/config.json +1 -1
  4. data/docs/Asset.md +1 -1
  5. data/docs/AssetResultSet.md +1 -1
  6. data/docs/DefaultApi.md +159 -145
  7. data/docs/WorkAttributes.md +3 -1
  8. data/lib/metatron_ruby_client.rb +8 -3
  9. data/lib/metatron_ruby_client/api/default_api.rb +439 -241
  10. data/lib/metatron_ruby_client/api_client.rb +6 -2
  11. data/lib/metatron_ruby_client/api_error.rb +4 -2
  12. data/lib/metatron_ruby_client/configuration.rb +3 -3
  13. data/lib/metatron_ruby_client/models/asset.rb +45 -3
  14. data/lib/metatron_ruby_client/models/asset_data.rb +61 -2
  15. data/lib/metatron_ruby_client/models/asset_meta.rb +23 -0
  16. data/lib/metatron_ruby_client/models/asset_result_set.rb +60 -3
  17. data/lib/metatron_ruby_client/models/error.rb +61 -2
  18. data/lib/metatron_ruby_client/models/errors.rb +27 -2
  19. data/lib/metatron_ruby_client/models/item.rb +40 -0
  20. data/lib/metatron_ruby_client/models/item_data.rb +28 -2
  21. data/lib/metatron_ruby_client/models/item_result_set.rb +60 -2
  22. data/lib/metatron_ruby_client/models/links.rb +60 -2
  23. data/lib/metatron_ruby_client/models/manifestation.rb +40 -0
  24. data/lib/metatron_ruby_client/models/manifestation_attributes.rb +75 -2
  25. data/lib/metatron_ruby_client/models/manifestation_data.rb +78 -2
  26. data/lib/metatron_ruby_client/models/manifestation_relationships.rb +59 -2
  27. data/lib/metatron_ruby_client/models/manifestation_result_set.rb +62 -2
  28. data/lib/metatron_ruby_client/models/one_to_many_relationship.rb +60 -2
  29. data/lib/metatron_ruby_client/models/one_to_one_relationship.rb +60 -2
  30. data/lib/metatron_ruby_client/models/resource_data.rb +78 -2
  31. data/lib/metatron_ruby_client/models/resource_link.rb +45 -2
  32. data/lib/metatron_ruby_client/models/result_set_meta.rb +59 -2
  33. data/lib/metatron_ruby_client/models/work.rb +40 -0
  34. data/lib/metatron_ruby_client/models/work_attributes.rb +90 -10
  35. data/lib/metatron_ruby_client/models/work_data.rb +78 -2
  36. data/lib/metatron_ruby_client/models/work_relationships.rb +27 -2
  37. data/lib/metatron_ruby_client/models/work_result_set.rb +75 -2
  38. data/lib/metatron_ruby_client/version.rb +5 -3
  39. data/metatron_ruby_client-0.0.1.gem +0 -0
  40. data/spec/api/default_api_spec.rb +11 -0
  41. data/spec/models/work_attributes_spec.rb +21 -1
  42. data/stub-service/.idea/.name +1 -0
  43. data/stub-service/.idea/encodings.xml +5 -0
  44. data/stub-service/.idea/metatron-dummy-server.iml +11 -0
  45. data/stub-service/.idea/misc.xml +5 -0
  46. data/stub-service/.idea/modules.xml +9 -0
  47. data/stub-service/.idea/scopes/scope_settings.xml +5 -0
  48. data/stub-service/.idea/vcs.xml +7 -0
  49. data/stub-service/.idea/workspace.xml +534 -0
  50. metadata +32 -24
  51. data/swagger-codegen-cli.jar +0 -0
@@ -1,7 +1,9 @@
1
1
  =begin
2
- production-metatron-api
2
+ Metatron Server
3
3
 
4
- OpenAPI spec version: 2016-07-15T09:42:29Z
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
 
@@ -12,19 +14,35 @@ require 'date'
12
14
 
13
15
  module MetatronClient
14
16
  class WorkAttributes
15
- attr_accessor :title
17
+ attr_accessor :titles
18
+
19
+ attr_accessor :authors
20
+
21
+ attr_accessor :isbns
16
22
 
17
23
  # Attribute mapping from ruby-style variable name to JSON key.
18
24
  def self.attribute_map
19
25
  {
20
- :'title' => :'title'
26
+
27
+ :'titles' => :'titles',
28
+
29
+ :'authors' => :'authors',
30
+
31
+ :'isbns' => :'isbns'
32
+
21
33
  }
22
34
  end
23
35
 
24
36
  # Attribute type mapping.
25
37
  def self.swagger_types
26
38
  {
27
- :'title' => :'String'
39
+
40
+ :'titles' => :'String',
41
+
42
+ :'authors' => :'Array<String>',
43
+
44
+ :'isbns' => :'Array<String>'
45
+
28
46
  }
29
47
  end
30
48
 
@@ -36,34 +54,96 @@ module MetatronClient
36
54
  # convert string to symbol for hash key
37
55
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
38
56
 
39
- if attributes.has_key?(:'title')
40
- self.title = attributes[:'title']
57
+
58
+ if attributes.has_key?(:'titles')
59
+
60
+
61
+ self.titles = attributes[:'titles']
62
+
63
+
64
+ end
65
+
66
+
67
+ if attributes.has_key?(:'authors')
68
+
69
+ if (value = attributes[:'authors']).is_a?(Array)
70
+ self.authors = value
71
+ end
72
+
73
+
74
+
75
+ end
76
+
77
+
78
+ if attributes.has_key?(:'isbns')
79
+
80
+ if (value = attributes[:'isbns']).is_a?(Array)
81
+ self.isbns = value
82
+ end
83
+
84
+
85
+
41
86
  end
42
87
 
88
+
43
89
  end
44
90
 
45
91
  # Show invalid properties with the reasons. Usually used together with valid?
46
92
  # @return Array for valid properies with the reasons
47
93
  def list_invalid_properties
48
94
  invalid_properties = Array.new
95
+
96
+
49
97
  return invalid_properties
50
98
  end
51
99
 
52
100
  # Check to see if the all the properties in the model are valid
53
101
  # @return true if the model is valid
54
102
  def valid?
55
- if @title.nil?
103
+
104
+
105
+ if @titles.nil?
56
106
  return false
57
107
  end
58
108
 
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
59
121
  end
60
122
 
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
61
139
  # Checks equality by comparing each attribute.
62
140
  # @param [Object] Object to be compared
63
141
  def ==(o)
64
142
  return true if self.equal?(o)
65
143
  self.class == o.class &&
66
- title == o.title
144
+ titles == o.titles &&
145
+ authors == o.authors &&
146
+ isbns == o.isbns
67
147
  end
68
148
 
69
149
  # @see the `==` method
@@ -75,7 +155,7 @@ module MetatronClient
75
155
  # Calculates hash code according to all attributes.
76
156
  # @return [Fixnum] Hash code
77
157
  def hash
78
- [title].hash
158
+ [titles, authors, isbns].hash
79
159
  end
80
160
 
81
161
  # Builds the object from hash
@@ -1,7 +1,9 @@
1
1
  =begin
2
- production-metatron-api
2
+ Metatron Server
3
3
 
4
- OpenAPI spec version: 2016-07-15T09:42:29Z
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' => :'WorkAttributes',
49
+
39
50
  :'relationships' => :'WorkRelationships'
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 = ["works"]
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)
@@ -1,7 +1,9 @@
1
1
  =begin
2
- production-metatron-api
2
+ Metatron Server
3
3
 
4
- OpenAPI spec version: 2016-07-15T09:42:29Z
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
 
@@ -17,14 +19,18 @@ module MetatronClient
17
19
  # Attribute mapping from ruby-style variable name to JSON key.
18
20
  def self.attribute_map
19
21
  {
22
+
20
23
  :'manifestations' => :'manifestations'
24
+
21
25
  }
22
26
  end
23
27
 
24
28
  # Attribute type mapping.
25
29
  def self.swagger_types
26
30
  {
31
+
27
32
  :'manifestations' => :'OneToManyRelationship'
33
+
28
34
  }
29
35
  end
30
36
 
@@ -36,24 +42,43 @@ module MetatronClient
36
42
  # convert string to symbol for hash key
37
43
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
38
44
 
45
+
39
46
  if attributes.has_key?(:'manifestations')
47
+
48
+
40
49
  self.manifestations = attributes[:'manifestations']
50
+
51
+
41
52
  end
42
53
 
54
+
43
55
  end
44
56
 
45
57
  # Show invalid properties with the reasons. Usually used together with valid?
46
58
  # @return Array for valid properies with the reasons
47
59
  def list_invalid_properties
48
60
  invalid_properties = Array.new
61
+
62
+
49
63
  return invalid_properties
50
64
  end
51
65
 
52
66
  # Check to see if the all the properties in the model are valid
53
67
  # @return true if the model is valid
54
68
  def valid?
69
+
70
+
71
+
72
+
73
+
55
74
  end
56
75
 
76
+
77
+
78
+
79
+
80
+
81
+
57
82
  # Checks equality by comparing each attribute.
58
83
  # @param [Object] Object to be compared
59
84
  def ==(o)
@@ -1,7 +1,9 @@
1
1
  =begin
2
- production-metatron-api
2
+ Metatron Server
3
3
 
4
- OpenAPI spec version: 2016-07-15T09:42:29Z
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
  :'links' => :'links',
30
+
27
31
  :'meta' => :'meta',
32
+
28
33
  :'data' => :'data',
34
+
29
35
  :'included' => :'included'
36
+
30
37
  }
31
38
  end
32
39
 
33
40
  # Attribute type mapping.
34
41
  def self.swagger_types
35
42
  {
43
+
36
44
  :'links' => :'Links',
45
+
37
46
  :'meta' => :'ResultSetMeta',
47
+
38
48
  :'data' => :'Array<WorkData>',
49
+
39
50
  :'included' => :'Array<ResourceData>'
51
+
40
52
  }
41
53
  end
42
54
 
@@ -48,40 +60,101 @@ 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?(:'links')
65
+
66
+
52
67
  self.links = attributes[:'links']
68
+
69
+
53
70
  end
54
71
 
72
+
55
73
  if attributes.has_key?(:'meta')
74
+
75
+
56
76
  self.meta = attributes[:'meta']
77
+
78
+
57
79
  end
58
80
 
81
+
59
82
  if attributes.has_key?(:'data')
83
+
60
84
  if (value = attributes[:'data']).is_a?(Array)
61
85
  self.data = value
62
86
  end
87
+
88
+
89
+
63
90
  end
64
91
 
92
+
65
93
  if attributes.has_key?(:'included')
94
+
66
95
  if (value = attributes[:'included']).is_a?(Array)
67
96
  self.included = value
68
97
  end
98
+
99
+
100
+
69
101
  end
70
102
 
103
+
71
104
  end
72
105
 
73
106
  # Show invalid properties with the reasons. Usually used together with valid?
74
107
  # @return Array for valid properies with the reasons
75
108
  def list_invalid_properties
76
109
  invalid_properties = Array.new
110
+
111
+
77
112
  return invalid_properties
78
113
  end
79
114
 
80
115
  # Check to see if the all the properties in the model are valid
81
116
  # @return true if the model is valid
82
117
  def valid?
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
83
135
  end
84
136
 
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
85
158
  # Checks equality by comparing each attribute.
86
159
  # @param [Object] Object to be compared
87
160
  def ==(o)