flat_api 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (209) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/README.md +34 -12
  4. data/docs/ClassApi.md +2 -2
  5. data/docs/Collection.md +18 -0
  6. data/docs/CollectionApi.md +521 -0
  7. data/docs/CollectionCapabilities.md +12 -0
  8. data/docs/CollectionCreation.md +8 -0
  9. data/docs/CollectionModification.md +8 -0
  10. data/docs/CollectionPrivacy.md +7 -0
  11. data/docs/CollectionTitle.md +7 -0
  12. data/docs/CollectionType.md +7 -0
  13. data/docs/ResourceCollaborator.md +16 -0
  14. data/docs/{ScoreCollaboratorCreation.md → ResourceCollaboratorCreation.md} +2 -1
  15. data/docs/ResourceRights.md +10 -0
  16. data/docs/ResourceSharingKey.md +7 -0
  17. data/docs/ScoreApi.md +144 -91
  18. data/docs/ScoreCreation.md +2 -1
  19. data/docs/ScoreDetails.md +2 -2
  20. data/docs/ScoreFork.md +1 -0
  21. data/docs/ScoreModification.md +2 -1
  22. data/docs/UserApi.md +1 -1
  23. data/flat_api.gemspec +1 -1
  24. data/lib/flat_api.rb +13 -4
  25. data/lib/flat_api/api/account_api.rb +1 -1
  26. data/lib/flat_api/api/class_api.rb +1 -1
  27. data/lib/flat_api/api/collection_api.rb +596 -0
  28. data/lib/flat_api/api/group_api.rb +1 -1
  29. data/lib/flat_api/api/organization_api.rb +1 -1
  30. data/lib/flat_api/api/score_api.rb +125 -53
  31. data/lib/flat_api/api/user_api.rb +3 -3
  32. data/lib/flat_api/api_client.rb +1 -1
  33. data/lib/flat_api/api_error.rb +1 -1
  34. data/lib/flat_api/configuration.rb +1 -1
  35. data/lib/flat_api/models/assignment.rb +1 -1
  36. data/lib/flat_api/models/assignment_copy.rb +1 -1
  37. data/lib/flat_api/models/assignment_creation.rb +1 -1
  38. data/lib/flat_api/models/assignment_submission.rb +1 -1
  39. data/lib/flat_api/models/assignment_submission_update.rb +1 -1
  40. data/lib/flat_api/models/class_attachment_creation.rb +1 -1
  41. data/lib/flat_api/models/class_creation.rb +1 -1
  42. data/lib/flat_api/models/class_details.rb +1 -1
  43. data/lib/flat_api/models/class_details_canvas.rb +1 -1
  44. data/lib/flat_api/models/class_details_clever.rb +1 -1
  45. data/lib/flat_api/models/class_details_google_classroom.rb +1 -1
  46. data/lib/flat_api/models/class_details_google_drive.rb +1 -1
  47. data/lib/flat_api/models/class_details_lti.rb +1 -1
  48. data/lib/flat_api/models/class_roles.rb +1 -1
  49. data/lib/flat_api/models/class_state.rb +1 -1
  50. data/lib/flat_api/models/class_update.rb +1 -1
  51. data/lib/flat_api/models/collection.rb +285 -0
  52. data/lib/flat_api/models/collection_capabilities.rb +229 -0
  53. data/lib/flat_api/models/collection_creation.rb +193 -0
  54. data/lib/flat_api/models/collection_modification.rb +188 -0
  55. data/lib/flat_api/models/collection_privacy.rb +30 -0
  56. data/lib/flat_api/models/collection_title.rb +179 -0
  57. data/lib/flat_api/models/collection_type.rb +34 -0
  58. data/lib/flat_api/models/flat_error_response.rb +1 -1
  59. data/lib/flat_api/models/flat_locales.rb +1 -1
  60. data/lib/flat_api/models/google_classroom_coursework.rb +1 -1
  61. data/lib/flat_api/models/google_classroom_submission.rb +1 -1
  62. data/lib/flat_api/models/group.rb +1 -1
  63. data/lib/flat_api/models/group_details.rb +1 -1
  64. data/lib/flat_api/models/group_type.rb +1 -1
  65. data/lib/flat_api/models/license_mode.rb +1 -1
  66. data/lib/flat_api/models/license_sources.rb +1 -1
  67. data/lib/flat_api/models/lms_name.rb +1 -1
  68. data/lib/flat_api/models/lti_credentials.rb +1 -1
  69. data/lib/flat_api/models/lti_credentials_creation.rb +1 -1
  70. data/lib/flat_api/models/media_attachment.rb +1 -1
  71. data/lib/flat_api/models/media_score_sharing_mode.rb +1 -1
  72. data/lib/flat_api/models/organization_invitation.rb +1 -1
  73. data/lib/flat_api/models/organization_invitation_creation.rb +1 -1
  74. data/lib/flat_api/models/organization_roles.rb +1 -1
  75. data/lib/flat_api/models/{score_collaborator.rb → resource_collaborator.rb} +54 -44
  76. data/lib/flat_api/models/{score_collaborator_creation.rb → resource_collaborator_creation.rb} +14 -4
  77. data/lib/flat_api/models/{score_rights.rb → resource_rights.rb} +6 -6
  78. data/lib/flat_api/models/resource_sharing_key.rb +179 -0
  79. data/lib/flat_api/models/score_comment.rb +1 -1
  80. data/lib/flat_api/models/score_comment_context.rb +1 -1
  81. data/lib/flat_api/models/score_comment_creation.rb +1 -1
  82. data/lib/flat_api/models/score_comment_update.rb +1 -1
  83. data/lib/flat_api/models/score_comments_counts.rb +1 -1
  84. data/lib/flat_api/models/score_creation.rb +13 -3
  85. data/lib/flat_api/models/score_creation_type.rb +1 -1
  86. data/lib/flat_api/models/score_data.rb +1 -1
  87. data/lib/flat_api/models/score_data_encoding.rb +1 -1
  88. data/lib/flat_api/models/score_details.rb +3 -3
  89. data/lib/flat_api/models/score_fork.rb +13 -3
  90. data/lib/flat_api/models/score_license.rb +1 -1
  91. data/lib/flat_api/models/score_likes_counts.rb +1 -1
  92. data/lib/flat_api/models/score_modification.rb +13 -20
  93. data/lib/flat_api/models/score_privacy.rb +1 -1
  94. data/lib/flat_api/models/score_revision.rb +1 -1
  95. data/lib/flat_api/models/score_revision_creation.rb +1 -1
  96. data/lib/flat_api/models/score_revision_statistics.rb +1 -1
  97. data/lib/flat_api/models/score_source.rb +1 -1
  98. data/lib/flat_api/models/score_summary.rb +1 -1
  99. data/lib/flat_api/models/score_track.rb +1 -1
  100. data/lib/flat_api/models/score_track_creation.rb +1 -1
  101. data/lib/flat_api/models/score_track_point.rb +1 -1
  102. data/lib/flat_api/models/score_track_state.rb +1 -1
  103. data/lib/flat_api/models/score_track_type.rb +1 -1
  104. data/lib/flat_api/models/score_track_update.rb +1 -1
  105. data/lib/flat_api/models/score_views_counts.rb +1 -1
  106. data/lib/flat_api/models/user_admin_update.rb +1 -1
  107. data/lib/flat_api/models/user_basics.rb +1 -1
  108. data/lib/flat_api/models/user_creation.rb +1 -1
  109. data/lib/flat_api/models/user_details.rb +1 -1
  110. data/lib/flat_api/models/user_details_admin.rb +1 -1
  111. data/lib/flat_api/models/user_details_admin_license.rb +1 -1
  112. data/lib/flat_api/models/user_instruments.rb +1 -1
  113. data/lib/flat_api/models/user_public.rb +1 -1
  114. data/lib/flat_api/models/user_public_summary.rb +1 -1
  115. data/lib/flat_api/version.rb +2 -2
  116. data/spec/api/account_api_spec.rb +2 -2
  117. data/spec/api/class_api_spec.rb +2 -2
  118. data/spec/api/collection_api_spec.rb +159 -0
  119. data/spec/api/group_api_spec.rb +2 -2
  120. data/spec/api/organization_api_spec.rb +2 -2
  121. data/spec/api/score_api_spec.rb +41 -26
  122. data/spec/api/user_api_spec.rb +3 -3
  123. data/spec/api_client_spec.rb +2 -2
  124. data/spec/configuration_spec.rb +2 -2
  125. data/spec/models/assignment_copy_spec.rb +2 -2
  126. data/spec/models/assignment_creation_spec.rb +2 -2
  127. data/spec/models/assignment_spec.rb +2 -2
  128. data/spec/models/assignment_submission_spec.rb +2 -2
  129. data/spec/models/assignment_submission_update_spec.rb +2 -2
  130. data/spec/models/class_attachment_creation_spec.rb +2 -2
  131. data/spec/models/class_creation_spec.rb +2 -2
  132. data/spec/models/class_details_canvas_spec.rb +2 -2
  133. data/spec/models/class_details_clever_spec.rb +2 -2
  134. data/spec/models/class_details_google_classroom_spec.rb +2 -2
  135. data/spec/models/class_details_google_drive_spec.rb +2 -2
  136. data/spec/models/class_details_lti_spec.rb +2 -2
  137. data/spec/models/class_details_spec.rb +2 -2
  138. data/spec/models/class_roles_spec.rb +2 -2
  139. data/spec/models/class_state_spec.rb +2 -2
  140. data/spec/models/class_update_spec.rb +2 -2
  141. data/spec/models/collection_capabilities_spec.rb +66 -0
  142. data/spec/models/collection_creation_spec.rb +42 -0
  143. data/spec/models/collection_modification_spec.rb +42 -0
  144. data/spec/models/collection_privacy_spec.rb +36 -0
  145. data/spec/models/collection_spec.rb +102 -0
  146. data/spec/models/collection_title_spec.rb +36 -0
  147. data/spec/models/collection_type_spec.rb +36 -0
  148. data/spec/models/flat_error_response_spec.rb +2 -2
  149. data/spec/models/flat_locales_spec.rb +2 -2
  150. data/spec/models/google_classroom_coursework_spec.rb +2 -2
  151. data/spec/models/google_classroom_submission_spec.rb +2 -2
  152. data/spec/models/group_details_spec.rb +2 -2
  153. data/spec/models/group_spec.rb +2 -2
  154. data/spec/models/group_type_spec.rb +2 -2
  155. data/spec/models/license_mode_spec.rb +2 -2
  156. data/spec/models/license_sources_spec.rb +2 -2
  157. data/spec/models/lms_name_spec.rb +2 -2
  158. data/spec/models/lti_credentials_creation_spec.rb +2 -2
  159. data/spec/models/lti_credentials_spec.rb +2 -2
  160. data/spec/models/media_attachment_spec.rb +2 -2
  161. data/spec/models/media_score_sharing_mode_spec.rb +2 -2
  162. data/spec/models/organization_invitation_creation_spec.rb +2 -2
  163. data/spec/models/organization_invitation_spec.rb +2 -2
  164. data/spec/models/organization_roles_spec.rb +2 -2
  165. data/spec/models/{score_collaborator_creation_spec.rb → resource_collaborator_creation_spec.rb} +14 -8
  166. data/spec/models/{score_collaborator_spec.rb → resource_collaborator_spec.rb} +22 -16
  167. data/spec/models/{score_rights_spec.rb → resource_rights_spec.rb} +14 -8
  168. data/spec/models/resource_sharing_key_spec.rb +36 -0
  169. data/spec/models/score_comment_context_spec.rb +2 -2
  170. data/spec/models/score_comment_creation_spec.rb +2 -2
  171. data/spec/models/score_comment_spec.rb +2 -2
  172. data/spec/models/score_comment_update_spec.rb +2 -2
  173. data/spec/models/score_comments_counts_spec.rb +2 -2
  174. data/spec/models/score_creation_spec.rb +8 -2
  175. data/spec/models/score_creation_type_spec.rb +2 -2
  176. data/spec/models/score_data_encoding_spec.rb +2 -2
  177. data/spec/models/score_data_spec.rb +2 -2
  178. data/spec/models/score_details_spec.rb +2 -2
  179. data/spec/models/score_fork_spec.rb +8 -2
  180. data/spec/models/score_license_spec.rb +2 -2
  181. data/spec/models/score_likes_counts_spec.rb +2 -2
  182. data/spec/models/score_modification_spec.rb +8 -2
  183. data/spec/models/score_privacy_spec.rb +2 -2
  184. data/spec/models/score_revision_creation_spec.rb +2 -2
  185. data/spec/models/score_revision_spec.rb +2 -2
  186. data/spec/models/score_revision_statistics_spec.rb +2 -2
  187. data/spec/models/score_source_spec.rb +2 -2
  188. data/spec/models/score_summary_spec.rb +2 -2
  189. data/spec/models/score_track_creation_spec.rb +2 -2
  190. data/spec/models/score_track_point_spec.rb +2 -2
  191. data/spec/models/score_track_spec.rb +2 -2
  192. data/spec/models/score_track_state_spec.rb +2 -2
  193. data/spec/models/score_track_type_spec.rb +2 -2
  194. data/spec/models/score_track_update_spec.rb +2 -2
  195. data/spec/models/score_views_counts_spec.rb +2 -2
  196. data/spec/models/user_admin_update_spec.rb +2 -2
  197. data/spec/models/user_basics_spec.rb +2 -2
  198. data/spec/models/user_creation_spec.rb +2 -2
  199. data/spec/models/user_details_admin_license_spec.rb +2 -2
  200. data/spec/models/user_details_admin_spec.rb +2 -2
  201. data/spec/models/user_details_spec.rb +2 -2
  202. data/spec/models/user_instruments_spec.rb +2 -2
  203. data/spec/models/user_public_spec.rb +2 -2
  204. data/spec/models/user_public_summary_spec.rb +2 -2
  205. data/spec/spec_helper.rb +2 -2
  206. metadata +50 -15
  207. data/docs/ScoreCollaborator.md +0 -15
  208. data/docs/ScoreRights.md +0 -10
  209. data/git_push.sh +0 -55
@@ -0,0 +1,30 @@
1
+ =begin
2
+ #Flat API
3
+
4
+ #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
+
6
+ OpenAPI spec version: 2.6.0
7
+ Contact: developers@flat.io
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module FlatApi
16
+ class CollectionPrivacy
17
+
18
+ PRIVATE = "private".freeze
19
+
20
+ # Builds the enum from string
21
+ # @param [String] The enum value in the form of the string
22
+ # @return [String] The enum value
23
+ def build_from_hash(value)
24
+ constantValues = CollectionPrivacy.constants.select{|c| CollectionPrivacy::const_get(c) == value}
25
+ raise "Invalid ENUM value #{value} for class #CollectionPrivacy" if constantValues.empty?
26
+ value
27
+ end
28
+ end
29
+
30
+ end
@@ -0,0 +1,179 @@
1
+ =begin
2
+ #Flat API
3
+
4
+ #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
+
6
+ OpenAPI spec version: 2.6.0
7
+ Contact: developers@flat.io
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module FlatApi
16
+ # The title of the collection
17
+ class CollectionTitle
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ }
23
+ end
24
+
25
+ # Attribute type mapping.
26
+ def self.swagger_types
27
+ {
28
+ }
29
+ end
30
+
31
+ # Initializes the object
32
+ # @param [Hash] attributes Model attributes in the form of hash
33
+ def initialize(attributes = {})
34
+ return unless attributes.is_a?(Hash)
35
+
36
+ # convert string to symbol for hash key
37
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
38
+
39
+ end
40
+
41
+ # Show invalid properties with the reasons. Usually used together with valid?
42
+ # @return Array for valid properties with the reasons
43
+ def list_invalid_properties
44
+ invalid_properties = Array.new
45
+ return invalid_properties
46
+ end
47
+
48
+ # Check to see if the all the properties in the model are valid
49
+ # @return true if the model is valid
50
+ def valid?
51
+ return true
52
+ end
53
+
54
+ # Checks equality by comparing each attribute.
55
+ # @param [Object] Object to be compared
56
+ def ==(o)
57
+ return true if self.equal?(o)
58
+ self.class == o.class
59
+ end
60
+
61
+ # @see the `==` method
62
+ # @param [Object] Object to be compared
63
+ def eql?(o)
64
+ self == o
65
+ end
66
+
67
+ # Calculates hash code according to all attributes.
68
+ # @return [Fixnum] Hash code
69
+ def hash
70
+ [].hash
71
+ end
72
+
73
+ # Builds the object from hash
74
+ # @param [Hash] attributes Model attributes in the form of hash
75
+ # @return [Object] Returns the model itself
76
+ def build_from_hash(attributes)
77
+ return nil unless attributes.is_a?(Hash)
78
+ self.class.swagger_types.each_pair do |key, type|
79
+ if type =~ /\AArray<(.*)>/i
80
+ # check to ensure the input is an array given that the the attribute
81
+ # is documented as an array but the input is not
82
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
83
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
84
+ end
85
+ elsif !attributes[self.class.attribute_map[key]].nil?
86
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
87
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
88
+ end
89
+
90
+ self
91
+ end
92
+
93
+ # Deserializes the data based on type
94
+ # @param string type Data type
95
+ # @param string value Value to be deserialized
96
+ # @return [Object] Deserialized data
97
+ def _deserialize(type, value)
98
+ case type.to_sym
99
+ when :DateTime
100
+ DateTime.parse(value)
101
+ when :Date
102
+ Date.parse(value)
103
+ when :String
104
+ value.to_s
105
+ when :Integer
106
+ value.to_i
107
+ when :Float
108
+ value.to_f
109
+ when :BOOLEAN
110
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
111
+ true
112
+ else
113
+ false
114
+ end
115
+ when :Object
116
+ # generic object (usually a Hash), return directly
117
+ value
118
+ when /\AArray<(?<inner_type>.+)>\z/
119
+ inner_type = Regexp.last_match[:inner_type]
120
+ value.map { |v| _deserialize(inner_type, v) }
121
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
122
+ k_type = Regexp.last_match[:k_type]
123
+ v_type = Regexp.last_match[:v_type]
124
+ {}.tap do |hash|
125
+ value.each do |k, v|
126
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
127
+ end
128
+ end
129
+ else # model
130
+ temp_model = FlatApi.const_get(type).new
131
+ temp_model.build_from_hash(value)
132
+ end
133
+ end
134
+
135
+ # Returns the string representation of the object
136
+ # @return [String] String presentation of the object
137
+ def to_s
138
+ to_hash.to_s
139
+ end
140
+
141
+ # to_body is an alias to to_hash (backward compatibility)
142
+ # @return [Hash] Returns the object in the form of hash
143
+ def to_body
144
+ to_hash
145
+ end
146
+
147
+ # Returns the object in the form of hash
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ next if value.nil?
154
+ hash[param] = _to_hash(value)
155
+ end
156
+ hash
157
+ end
158
+
159
+ # Outputs non-array value in the form of hash
160
+ # For object, use to_hash. Otherwise, just return the value
161
+ # @param [Object] value Any valid value
162
+ # @return [Hash] Returns the value in the form of hash
163
+ def _to_hash(value)
164
+ if value.is_a?(Array)
165
+ value.compact.map{ |v| _to_hash(v) }
166
+ elsif value.is_a?(Hash)
167
+ {}.tap do |hash|
168
+ value.each { |k, v| hash[k] = _to_hash(v) }
169
+ end
170
+ elsif value.respond_to? :to_hash
171
+ value.to_hash
172
+ else
173
+ value
174
+ end
175
+ end
176
+
177
+ end
178
+
179
+ end
@@ -0,0 +1,34 @@
1
+ =begin
2
+ #Flat API
3
+
4
+ #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
+
6
+ OpenAPI spec version: 2.6.0
7
+ Contact: developers@flat.io
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module FlatApi
16
+ class CollectionType
17
+
18
+ ROOT = "root".freeze
19
+ REGULAR = "regular".freeze
20
+ SHARED_WITH_ME = "sharedWithMe".freeze
21
+ SHARED_WITH_GROUP = "sharedWithGroup".freeze
22
+ TRASH = "trash".freeze
23
+
24
+ # Builds the enum from string
25
+ # @param [String] The enum value in the form of the string
26
+ # @return [String] The enum value
27
+ def build_from_hash(value)
28
+ constantValues = CollectionType.constants.select{|c| CollectionType::const_get(c) == value}
29
+ raise "Invalid ENUM value #{value} for class #CollectionType" if constantValues.empty?
30
+ value
31
+ end
32
+ end
33
+
34
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
5
 
6
- OpenAPI spec version: 2.5.2
6
+ OpenAPI spec version: 2.6.0
7
7
  Contact: developers@flat.io
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.0-SNAPSHOT
@@ -14,13 +14,25 @@ require 'date'
14
14
 
15
15
  module FlatApi
16
16
  # A collaborator of a score. The `userEmail` and `group` are only available if the requesting user is a collaborator of the related score (in this case these permissions will eventualy not be listed and exposed publicly).
17
- class ScoreCollaborator
18
- # The unique identifier of the score permission
17
+ class ResourceCollaborator
18
+ # `True` if the current user can read the current document
19
+ attr_accessor :acl_read
20
+
21
+ # `True` if the current user can modify the current document. If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection.
22
+ attr_accessor :acl_write
23
+
24
+ # `True` if the current user can manage the current document (i.e. share, delete) If this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection.
25
+ attr_accessor :acl_admin
26
+
27
+ # The unique identifier of the permission
19
28
  attr_accessor :id
20
29
 
21
- # The unique identifier of the score
30
+ # If this object is a permission of a score, this property will contain the unique identifier of the score
22
31
  attr_accessor :score
23
32
 
33
+ # If this object is a permission of a collection, this property will contain the unique identifier of the collection
34
+ attr_accessor :collection
35
+
24
36
  attr_accessor :user
25
37
 
26
38
  attr_accessor :group
@@ -28,41 +40,34 @@ module FlatApi
28
40
  # If the collaborator is not a user of Flat yet, this field will contain his email.
29
41
  attr_accessor :user_email
30
42
 
31
- # `True` if the related user can read the score. (probably true if the user has a permission on the document).
32
- attr_accessor :acl_read
33
-
34
- # `True` if the related user can modify the score.
35
- attr_accessor :acl_write
36
-
37
- # `True` if the related user can can manage the current document, i.e. changing the document permissions and deleting the document
38
- attr_accessor :acl_admin
39
-
40
43
 
41
44
  # Attribute mapping from ruby-style variable name to JSON key.
42
45
  def self.attribute_map
43
46
  {
47
+ :'acl_read' => :'aclRead',
48
+ :'acl_write' => :'aclWrite',
49
+ :'acl_admin' => :'aclAdmin',
44
50
  :'id' => :'id',
45
51
  :'score' => :'score',
52
+ :'collection' => :'collection',
46
53
  :'user' => :'user',
47
54
  :'group' => :'group',
48
- :'user_email' => :'userEmail',
49
- :'acl_read' => :'aclRead',
50
- :'acl_write' => :'aclWrite',
51
- :'acl_admin' => :'aclAdmin'
55
+ :'user_email' => :'userEmail'
52
56
  }
53
57
  end
54
58
 
55
59
  # Attribute type mapping.
56
60
  def self.swagger_types
57
61
  {
62
+ :'acl_read' => :'BOOLEAN',
63
+ :'acl_write' => :'BOOLEAN',
64
+ :'acl_admin' => :'BOOLEAN',
58
65
  :'id' => :'String',
59
66
  :'score' => :'String',
67
+ :'collection' => :'String',
60
68
  :'user' => :'UserPublic',
61
69
  :'group' => :'Group',
62
- :'user_email' => :'String',
63
- :'acl_read' => :'BOOLEAN',
64
- :'acl_write' => :'BOOLEAN',
65
- :'acl_admin' => :'BOOLEAN'
70
+ :'user_email' => :'String'
66
71
  }
67
72
  end
68
73
 
@@ -74,6 +79,24 @@ module FlatApi
74
79
  # convert string to symbol for hash key
75
80
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
76
81
 
82
+ if attributes.has_key?(:'aclRead')
83
+ self.acl_read = attributes[:'aclRead']
84
+ else
85
+ self.acl_read = false
86
+ end
87
+
88
+ if attributes.has_key?(:'aclWrite')
89
+ self.acl_write = attributes[:'aclWrite']
90
+ else
91
+ self.acl_write = false
92
+ end
93
+
94
+ if attributes.has_key?(:'aclAdmin')
95
+ self.acl_admin = attributes[:'aclAdmin']
96
+ else
97
+ self.acl_admin = false
98
+ end
99
+
77
100
  if attributes.has_key?(:'id')
78
101
  self.id = attributes[:'id']
79
102
  end
@@ -82,6 +105,10 @@ module FlatApi
82
105
  self.score = attributes[:'score']
83
106
  end
84
107
 
108
+ if attributes.has_key?(:'collection')
109
+ self.collection = attributes[:'collection']
110
+ end
111
+
85
112
  if attributes.has_key?(:'user')
86
113
  self.user = attributes[:'user']
87
114
  end
@@ -94,24 +121,6 @@ module FlatApi
94
121
  self.user_email = attributes[:'userEmail']
95
122
  end
96
123
 
97
- if attributes.has_key?(:'aclRead')
98
- self.acl_read = attributes[:'aclRead']
99
- else
100
- self.acl_read = true
101
- end
102
-
103
- if attributes.has_key?(:'aclWrite')
104
- self.acl_write = attributes[:'aclWrite']
105
- else
106
- self.acl_write = false
107
- end
108
-
109
- if attributes.has_key?(:'aclAdmin')
110
- self.acl_admin = attributes[:'aclAdmin']
111
- else
112
- self.acl_admin = false
113
- end
114
-
115
124
  end
116
125
 
117
126
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -132,14 +141,15 @@ module FlatApi
132
141
  def ==(o)
133
142
  return true if self.equal?(o)
134
143
  self.class == o.class &&
144
+ acl_read == o.acl_read &&
145
+ acl_write == o.acl_write &&
146
+ acl_admin == o.acl_admin &&
135
147
  id == o.id &&
136
148
  score == o.score &&
149
+ collection == o.collection &&
137
150
  user == o.user &&
138
151
  group == o.group &&
139
- user_email == o.user_email &&
140
- acl_read == o.acl_read &&
141
- acl_write == o.acl_write &&
142
- acl_admin == o.acl_admin
152
+ user_email == o.user_email
143
153
  end
144
154
 
145
155
  # @see the `==` method
@@ -151,7 +161,7 @@ module FlatApi
151
161
  # Calculates hash code according to all attributes.
152
162
  # @return [Fixnum] Hash code
153
163
  def hash
154
- [id, score, user, group, user_email, acl_read, acl_write, acl_admin].hash
164
+ [acl_read, acl_write, acl_admin, id, score, collection, user, group, user_email].hash
155
165
  end
156
166
 
157
167
  # Builds the object from hash