zsgf_client 1.0.20 → 1.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/docs/AccessTokenApi.md +14 -14
- data/docs/AccessTokenPutRequest.md +2 -2
- data/docs/AppUserListResponse.md +12 -12
- data/docs/AppUserResetEmailRequest.md +20 -0
- data/docs/AppUserResetPhoneRequest.md +20 -0
- data/docs/AppUserResetPwdRequest.md +4 -8
- data/docs/CommonFriendModel.md +3 -3
- data/docs/EmailSignInRequest.md +3 -3
- data/docs/EmailSignUpRequest.md +5 -5
- data/docs/FileApi.md +4 -4
- data/docs/FollowerModel.md +12 -12
- data/docs/FollowerPutModel.md +6 -6
- data/docs/GeoLocation.md +62 -0
- data/docs/GeoLocationModel.md +4 -4
- data/docs/GeoLocationResponseModel.md +4 -4
- data/docs/GetUserProfileResult.md +24 -0
- data/docs/{UserFollowingResultApiResponse.md → GetUserProfileResultApiResponse.md} +3 -3
- data/docs/MySqlGeometry.md +26 -0
- data/docs/OAuthAccountSignInRequest.md +3 -3
- data/docs/PhoneSignInRequest.md +3 -3
- data/docs/PhoneSignUpRequest.md +7 -7
- data/docs/QRCodePreSignInRequest.md +3 -3
- data/docs/QRCodeScanRequest.md +1 -1
- data/docs/QRCodeSignInRequest.md +1 -1
- data/docs/QRCodeSignUpRequest.md +8 -8
- data/docs/RecommendFriend.md +21 -11
- data/docs/SendEmailCodeRequest.md +2 -2
- data/docs/SendSMSCodeRequest.md +2 -2
- data/docs/SignInRequest.md +3 -3
- data/docs/SignUpRequest.md +8 -8
- data/docs/StorageApi.md +86 -6
- data/docs/UnionIDSignInRequest.md +3 -3
- data/docs/UnionIDSignUpRequest.md +10 -10
- data/docs/UpdateProfileRequest.md +27 -15
- data/docs/UserApi.md +358 -54
- data/docs/UserFriendsNearByResult.md +3 -3
- data/docs/UserProfileResult.md +2 -28
- data/docs/WechatApi.md +86 -12
- data/lib/zsgf_client/api/access_token_api.rb +14 -14
- data/lib/zsgf_client/api/file_api.rb +3 -3
- data/lib/zsgf_client/api/storage_api.rb +105 -6
- data/lib/zsgf_client/api/user_api.rb +349 -60
- data/lib/zsgf_client/api/wechat_api.rb +88 -18
- data/lib/zsgf_client/models/access_token_put_request.rb +3 -27
- data/lib/zsgf_client/models/app_user_list_response.rb +12 -0
- data/lib/zsgf_client/models/app_user_reset_email_request.rb +269 -0
- data/lib/zsgf_client/models/app_user_reset_phone_request.rb +269 -0
- data/lib/zsgf_client/models/app_user_reset_pwd_request.rb +52 -70
- data/lib/zsgf_client/models/common_friend_model.rb +3 -0
- data/lib/zsgf_client/models/email_sign_in_request.rb +38 -1
- data/lib/zsgf_client/models/email_sign_up_request.rb +30 -8
- data/lib/zsgf_client/models/follower_model.rb +12 -0
- data/lib/zsgf_client/models/follower_put_model.rb +6 -0
- data/lib/zsgf_client/models/geo_location.rb +750 -0
- data/lib/zsgf_client/models/geo_location_model.rb +262 -12
- data/lib/zsgf_client/models/geo_location_response_model.rb +262 -12
- data/lib/zsgf_client/models/{user_following_result.rb → get_user_profile_result.rb} +37 -18
- data/lib/zsgf_client/models/{user_following_result_api_response.rb → get_user_profile_result_api_response.rb} +4 -4
- data/lib/zsgf_client/models/my_sql_geometry.rb +260 -0
- data/lib/zsgf_client/models/o_auth_account_sign_in_request.rb +78 -1
- data/lib/zsgf_client/models/phone_sign_in_request.rb +49 -1
- data/lib/zsgf_client/models/phone_sign_up_request.rb +29 -24
- data/lib/zsgf_client/models/qr_code_pre_sign_in_request.rb +97 -0
- data/lib/zsgf_client/models/qr_code_scan_request.rb +1 -0
- data/lib/zsgf_client/models/qr_code_sign_in_request.rb +1 -0
- data/lib/zsgf_client/models/qr_code_sign_up_request.rb +38 -33
- data/lib/zsgf_client/models/recommend_friend.rb +69 -4
- data/lib/zsgf_client/models/send_email_code_request.rb +2 -1
- data/lib/zsgf_client/models/send_sms_code_request.rb +2 -2
- data/lib/zsgf_client/models/sign_in_request.rb +77 -11
- data/lib/zsgf_client/models/sign_up_request.rb +47 -35
- data/lib/zsgf_client/models/union_id_sign_in_request.rb +78 -1
- data/lib/zsgf_client/models/union_id_sign_up_request.rb +92 -45
- data/lib/zsgf_client/models/update_profile_request.rb +99 -24
- data/lib/zsgf_client/models/user_friends_near_by_result.rb +10 -7
- data/lib/zsgf_client/models/user_profile_result.rb +7 -133
- data/lib/zsgf_client/version.rb +1 -1
- data/lib/zsgf_client.rb +6 -2
- data/spec/api/access_token_api_spec.rb +7 -7
- data/spec/api/file_api_spec.rb +1 -1
- data/spec/api/storage_api_spec.rb +17 -1
- data/spec/api/user_api_spec.rb +81 -23
- data/spec/api/wechat_api_spec.rb +19 -6
- data/spec/models/{user_following_result_spec.rb → app_user_reset_email_request_spec.rb} +8 -8
- data/spec/models/app_user_reset_phone_request_spec.rb +42 -0
- data/spec/models/app_user_reset_pwd_request_spec.rb +2 -14
- data/spec/models/geo_location_model_spec.rb +3 -3
- data/spec/models/geo_location_response_model_spec.rb +3 -3
- data/spec/models/geo_location_spec.rb +168 -0
- data/spec/models/{user_following_result_api_response_spec.rb → get_user_profile_result_api_response_spec.rb} +6 -6
- data/spec/models/get_user_profile_result_spec.rb +54 -0
- data/spec/models/my_sql_geometry_spec.rb +60 -0
- data/spec/models/recommend_friend_spec.rb +30 -0
- data/spec/models/update_profile_request_spec.rb +36 -0
- data/spec/models/user_friends_near_by_result_spec.rb +1 -1
- data/spec/models/user_profile_result_spec.rb +1 -79
- data/zsgf_client.gemspec +3 -3
- metadata +214 -198
- data/docs/UserFollowingResult.md +0 -20
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#全部 API 文档
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.13.0-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module ZSGFClient
|
|
17
|
+
class AppUserResetPhoneRequest
|
|
18
|
+
# 手机号码
|
|
19
|
+
attr_accessor :phone
|
|
20
|
+
|
|
21
|
+
# 手机验证码
|
|
22
|
+
attr_accessor :code
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'phone' => :'phone',
|
|
28
|
+
:'code' => :'code'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'phone' => :'String',
|
|
46
|
+
:'code' => :'String'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
:'phone',
|
|
54
|
+
])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Initializes the object
|
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
59
|
+
def initialize(attributes = {})
|
|
60
|
+
if (!attributes.is_a?(Hash))
|
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ZSGFClient::AppUserResetPhoneRequest` initialize method"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
65
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
67
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ZSGFClient::AppUserResetPhoneRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
69
|
+
end
|
|
70
|
+
h[k.to_sym] = v
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if attributes.key?(:'phone')
|
|
74
|
+
self.phone = attributes[:'phone']
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'code')
|
|
78
|
+
self.code = attributes[:'code']
|
|
79
|
+
else
|
|
80
|
+
self.code = nil
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
85
|
+
# @return Array for valid properties with the reasons
|
|
86
|
+
def list_invalid_properties
|
|
87
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
88
|
+
invalid_properties = Array.new
|
|
89
|
+
if @code.nil?
|
|
90
|
+
invalid_properties.push('invalid value for "code", code cannot be nil.')
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if @code.to_s.length < 1
|
|
94
|
+
invalid_properties.push('invalid value for "code", the character length must be great than or equal to 1.')
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
pattern = Regexp.new(/\d{4,8}$/)
|
|
98
|
+
if @code !~ pattern
|
|
99
|
+
invalid_properties.push("invalid value for \"code\", must conform to the pattern #{pattern}.")
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
invalid_properties
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Check to see if the all the properties in the model are valid
|
|
106
|
+
# @return true if the model is valid
|
|
107
|
+
def valid?
|
|
108
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
109
|
+
return false if @code.nil?
|
|
110
|
+
return false if @code.to_s.length < 1
|
|
111
|
+
return false if @code !~ Regexp.new(/\d{4,8}$/)
|
|
112
|
+
true
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Custom attribute writer method with validation
|
|
116
|
+
# @param [Object] code Value to be assigned
|
|
117
|
+
def code=(code)
|
|
118
|
+
if code.nil?
|
|
119
|
+
fail ArgumentError, 'code cannot be nil'
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if code.to_s.length < 1
|
|
123
|
+
fail ArgumentError, 'invalid value for "code", the character length must be great than or equal to 1.'
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
pattern = Regexp.new(/\d{4,8}$/)
|
|
127
|
+
if code !~ pattern
|
|
128
|
+
fail ArgumentError, "invalid value for \"code\", must conform to the pattern #{pattern}."
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
@code = code
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Checks equality by comparing each attribute.
|
|
135
|
+
# @param [Object] Object to be compared
|
|
136
|
+
def ==(o)
|
|
137
|
+
return true if self.equal?(o)
|
|
138
|
+
self.class == o.class &&
|
|
139
|
+
phone == o.phone &&
|
|
140
|
+
code == o.code
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# @see the `==` method
|
|
144
|
+
# @param [Object] Object to be compared
|
|
145
|
+
def eql?(o)
|
|
146
|
+
self == o
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Calculates hash code according to all attributes.
|
|
150
|
+
# @return [Integer] Hash code
|
|
151
|
+
def hash
|
|
152
|
+
[phone, code].hash
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Builds the object from hash
|
|
156
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
157
|
+
# @return [Object] Returns the model itself
|
|
158
|
+
def self.build_from_hash(attributes)
|
|
159
|
+
return nil unless attributes.is_a?(Hash)
|
|
160
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
161
|
+
transformed_hash = {}
|
|
162
|
+
openapi_types.each_pair do |key, type|
|
|
163
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
164
|
+
transformed_hash["#{key}"] = nil
|
|
165
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
166
|
+
# check to ensure the input is an array given that the attribute
|
|
167
|
+
# is documented as an array but the input is not
|
|
168
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
169
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
170
|
+
end
|
|
171
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
172
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
new(transformed_hash)
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Deserializes the data based on type
|
|
179
|
+
# @param string type Data type
|
|
180
|
+
# @param string value Value to be deserialized
|
|
181
|
+
# @return [Object] Deserialized data
|
|
182
|
+
def self._deserialize(type, value)
|
|
183
|
+
case type.to_sym
|
|
184
|
+
when :Time
|
|
185
|
+
Time.parse(value)
|
|
186
|
+
when :Date
|
|
187
|
+
Date.parse(value)
|
|
188
|
+
when :String
|
|
189
|
+
value.to_s
|
|
190
|
+
when :Integer
|
|
191
|
+
value.to_i
|
|
192
|
+
when :Float
|
|
193
|
+
value.to_f
|
|
194
|
+
when :Boolean
|
|
195
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
196
|
+
true
|
|
197
|
+
else
|
|
198
|
+
false
|
|
199
|
+
end
|
|
200
|
+
when :Object
|
|
201
|
+
# generic object (usually a Hash), return directly
|
|
202
|
+
value
|
|
203
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
204
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
205
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
206
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
207
|
+
k_type = Regexp.last_match[:k_type]
|
|
208
|
+
v_type = Regexp.last_match[:v_type]
|
|
209
|
+
{}.tap do |hash|
|
|
210
|
+
value.each do |k, v|
|
|
211
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
else # model
|
|
215
|
+
# models (e.g. Pet) or oneOf
|
|
216
|
+
klass = ZSGFClient.const_get(type)
|
|
217
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Returns the string representation of the object
|
|
222
|
+
# @return [String] String presentation of the object
|
|
223
|
+
def to_s
|
|
224
|
+
to_hash.to_s
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
228
|
+
# @return [Hash] Returns the object in the form of hash
|
|
229
|
+
def to_body
|
|
230
|
+
to_hash
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Returns the object in the form of hash
|
|
234
|
+
# @return [Hash] Returns the object in the form of hash
|
|
235
|
+
def to_hash
|
|
236
|
+
hash = {}
|
|
237
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
238
|
+
value = self.send(attr)
|
|
239
|
+
if value.nil?
|
|
240
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
241
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
hash[param] = _to_hash(value)
|
|
245
|
+
end
|
|
246
|
+
hash
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Outputs non-array value in the form of hash
|
|
250
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
251
|
+
# @param [Object] value Any valid value
|
|
252
|
+
# @return [Hash] Returns the value in the form of hash
|
|
253
|
+
def _to_hash(value)
|
|
254
|
+
if value.is_a?(Array)
|
|
255
|
+
value.compact.map { |v| _to_hash(v) }
|
|
256
|
+
elsif value.is_a?(Hash)
|
|
257
|
+
{}.tap do |hash|
|
|
258
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
259
|
+
end
|
|
260
|
+
elsif value.respond_to? :to_hash
|
|
261
|
+
value.to_hash
|
|
262
|
+
else
|
|
263
|
+
value
|
|
264
|
+
end
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
end
|
|
@@ -15,21 +15,17 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module ZSGFClient
|
|
17
17
|
class AppUserResetPwdRequest
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
attr_accessor :email
|
|
21
|
-
|
|
22
|
-
attr_accessor :code
|
|
23
|
-
|
|
18
|
+
# 新的密码
|
|
24
19
|
attr_accessor :pwd
|
|
25
20
|
|
|
21
|
+
# 旧的密码
|
|
22
|
+
attr_accessor :oldpwd
|
|
23
|
+
|
|
26
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
25
|
def self.attribute_map
|
|
28
26
|
{
|
|
29
|
-
:'
|
|
30
|
-
:'
|
|
31
|
-
:'code' => :'code',
|
|
32
|
-
:'pwd' => :'pwd'
|
|
27
|
+
:'pwd' => :'pwd',
|
|
28
|
+
:'oldpwd' => :'oldpwd'
|
|
33
29
|
}
|
|
34
30
|
end
|
|
35
31
|
|
|
@@ -46,18 +42,14 @@ module ZSGFClient
|
|
|
46
42
|
# Attribute type mapping.
|
|
47
43
|
def self.openapi_types
|
|
48
44
|
{
|
|
49
|
-
:'
|
|
50
|
-
:'
|
|
51
|
-
:'code' => :'String',
|
|
52
|
-
:'pwd' => :'String'
|
|
45
|
+
:'pwd' => :'String',
|
|
46
|
+
:'oldpwd' => :'String'
|
|
53
47
|
}
|
|
54
48
|
end
|
|
55
49
|
|
|
56
50
|
# List of attributes with nullable: true
|
|
57
51
|
def self.openapi_nullable
|
|
58
52
|
Set.new([
|
|
59
|
-
:'phone',
|
|
60
|
-
:'email',
|
|
61
53
|
])
|
|
62
54
|
end
|
|
63
55
|
|
|
@@ -77,25 +69,17 @@ module ZSGFClient
|
|
|
77
69
|
h[k.to_sym] = v
|
|
78
70
|
}
|
|
79
71
|
|
|
80
|
-
if attributes.key?(:'phone')
|
|
81
|
-
self.phone = attributes[:'phone']
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
if attributes.key?(:'email')
|
|
85
|
-
self.email = attributes[:'email']
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
if attributes.key?(:'code')
|
|
89
|
-
self.code = attributes[:'code']
|
|
90
|
-
else
|
|
91
|
-
self.code = nil
|
|
92
|
-
end
|
|
93
|
-
|
|
94
72
|
if attributes.key?(:'pwd')
|
|
95
73
|
self.pwd = attributes[:'pwd']
|
|
96
74
|
else
|
|
97
75
|
self.pwd = nil
|
|
98
76
|
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'oldpwd')
|
|
79
|
+
self.oldpwd = attributes[:'oldpwd']
|
|
80
|
+
else
|
|
81
|
+
self.oldpwd = nil
|
|
82
|
+
end
|
|
99
83
|
end
|
|
100
84
|
|
|
101
85
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -103,19 +87,6 @@ module ZSGFClient
|
|
|
103
87
|
def list_invalid_properties
|
|
104
88
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
105
89
|
invalid_properties = Array.new
|
|
106
|
-
if @code.nil?
|
|
107
|
-
invalid_properties.push('invalid value for "code", code cannot be nil.')
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
if @code.to_s.length < 1
|
|
111
|
-
invalid_properties.push('invalid value for "code", the character length must be great than or equal to 1.')
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
pattern = Regexp.new(/\d{4,8}$/)
|
|
115
|
-
if @code !~ pattern
|
|
116
|
-
invalid_properties.push("invalid value for \"code\", must conform to the pattern #{pattern}.")
|
|
117
|
-
end
|
|
118
|
-
|
|
119
90
|
if @pwd.nil?
|
|
120
91
|
invalid_properties.push('invalid value for "pwd", pwd cannot be nil.')
|
|
121
92
|
end
|
|
@@ -129,6 +100,19 @@ module ZSGFClient
|
|
|
129
100
|
invalid_properties.push("invalid value for \"pwd\", must conform to the pattern #{pattern}.")
|
|
130
101
|
end
|
|
131
102
|
|
|
103
|
+
if @oldpwd.nil?
|
|
104
|
+
invalid_properties.push('invalid value for "oldpwd", oldpwd cannot be nil.')
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if @oldpwd.to_s.length < 1
|
|
108
|
+
invalid_properties.push('invalid value for "oldpwd", the character length must be great than or equal to 1.')
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
pattern = Regexp.new(/^.{6,32}$/)
|
|
112
|
+
if @oldpwd !~ pattern
|
|
113
|
+
invalid_properties.push("invalid value for \"oldpwd\", must conform to the pattern #{pattern}.")
|
|
114
|
+
end
|
|
115
|
+
|
|
132
116
|
invalid_properties
|
|
133
117
|
end
|
|
134
118
|
|
|
@@ -136,34 +120,15 @@ module ZSGFClient
|
|
|
136
120
|
# @return true if the model is valid
|
|
137
121
|
def valid?
|
|
138
122
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
139
|
-
return false if @code.nil?
|
|
140
|
-
return false if @code.to_s.length < 1
|
|
141
|
-
return false if @code !~ Regexp.new(/\d{4,8}$/)
|
|
142
123
|
return false if @pwd.nil?
|
|
143
124
|
return false if @pwd.to_s.length < 1
|
|
144
125
|
return false if @pwd !~ Regexp.new(/^.{6,32}$/)
|
|
126
|
+
return false if @oldpwd.nil?
|
|
127
|
+
return false if @oldpwd.to_s.length < 1
|
|
128
|
+
return false if @oldpwd !~ Regexp.new(/^.{6,32}$/)
|
|
145
129
|
true
|
|
146
130
|
end
|
|
147
131
|
|
|
148
|
-
# Custom attribute writer method with validation
|
|
149
|
-
# @param [Object] code Value to be assigned
|
|
150
|
-
def code=(code)
|
|
151
|
-
if code.nil?
|
|
152
|
-
fail ArgumentError, 'code cannot be nil'
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
if code.to_s.length < 1
|
|
156
|
-
fail ArgumentError, 'invalid value for "code", the character length must be great than or equal to 1.'
|
|
157
|
-
end
|
|
158
|
-
|
|
159
|
-
pattern = Regexp.new(/\d{4,8}$/)
|
|
160
|
-
if code !~ pattern
|
|
161
|
-
fail ArgumentError, "invalid value for \"code\", must conform to the pattern #{pattern}."
|
|
162
|
-
end
|
|
163
|
-
|
|
164
|
-
@code = code
|
|
165
|
-
end
|
|
166
|
-
|
|
167
132
|
# Custom attribute writer method with validation
|
|
168
133
|
# @param [Object] pwd Value to be assigned
|
|
169
134
|
def pwd=(pwd)
|
|
@@ -183,15 +148,32 @@ module ZSGFClient
|
|
|
183
148
|
@pwd = pwd
|
|
184
149
|
end
|
|
185
150
|
|
|
151
|
+
# Custom attribute writer method with validation
|
|
152
|
+
# @param [Object] oldpwd Value to be assigned
|
|
153
|
+
def oldpwd=(oldpwd)
|
|
154
|
+
if oldpwd.nil?
|
|
155
|
+
fail ArgumentError, 'oldpwd cannot be nil'
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if oldpwd.to_s.length < 1
|
|
159
|
+
fail ArgumentError, 'invalid value for "oldpwd", the character length must be great than or equal to 1.'
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
pattern = Regexp.new(/^.{6,32}$/)
|
|
163
|
+
if oldpwd !~ pattern
|
|
164
|
+
fail ArgumentError, "invalid value for \"oldpwd\", must conform to the pattern #{pattern}."
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
@oldpwd = oldpwd
|
|
168
|
+
end
|
|
169
|
+
|
|
186
170
|
# Checks equality by comparing each attribute.
|
|
187
171
|
# @param [Object] Object to be compared
|
|
188
172
|
def ==(o)
|
|
189
173
|
return true if self.equal?(o)
|
|
190
174
|
self.class == o.class &&
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
code == o.code &&
|
|
194
|
-
pwd == o.pwd
|
|
175
|
+
pwd == o.pwd &&
|
|
176
|
+
oldpwd == o.oldpwd
|
|
195
177
|
end
|
|
196
178
|
|
|
197
179
|
# @see the `==` method
|
|
@@ -203,7 +185,7 @@ module ZSGFClient
|
|
|
203
185
|
# Calculates hash code according to all attributes.
|
|
204
186
|
# @return [Integer] Hash code
|
|
205
187
|
def hash
|
|
206
|
-
[
|
|
188
|
+
[pwd, oldpwd].hash
|
|
207
189
|
end
|
|
208
190
|
|
|
209
191
|
# Builds the object from hash
|
|
@@ -15,10 +15,13 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module ZSGFClient
|
|
17
17
|
class CommonFriendModel
|
|
18
|
+
# 用户ID
|
|
18
19
|
attr_accessor :user_id
|
|
19
20
|
|
|
21
|
+
# 昵称
|
|
20
22
|
attr_accessor :nick_name
|
|
21
23
|
|
|
24
|
+
# 头像
|
|
22
25
|
attr_accessor :avatar
|
|
23
26
|
|
|
24
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -15,11 +15,13 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module ZSGFClient
|
|
17
17
|
class EmailSignInRequest
|
|
18
|
+
# 用户邮箱地址
|
|
18
19
|
attr_accessor :email
|
|
19
20
|
|
|
21
|
+
# 验证码,长度为4到8位的数字
|
|
20
22
|
attr_accessor :verify_code
|
|
21
23
|
|
|
22
|
-
#
|
|
24
|
+
# 双因素认证代码,如果启用双因素认证登录,则必填
|
|
23
25
|
attr_accessor :two_factor_code
|
|
24
26
|
|
|
25
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -116,6 +118,19 @@ module ZSGFClient
|
|
|
116
118
|
invalid_properties.push("invalid value for \"verify_code\", must conform to the pattern #{pattern}.")
|
|
117
119
|
end
|
|
118
120
|
|
|
121
|
+
if !@two_factor_code.nil? && @two_factor_code.to_s.length > 6
|
|
122
|
+
invalid_properties.push('invalid value for "two_factor_code", the character length must be smaller than or equal to 6.')
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if !@two_factor_code.nil? && @two_factor_code.to_s.length < 6
|
|
126
|
+
invalid_properties.push('invalid value for "two_factor_code", the character length must be great than or equal to 6.')
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
pattern = Regexp.new(/^[0-9]*$/)
|
|
130
|
+
if !@two_factor_code.nil? && @two_factor_code !~ pattern
|
|
131
|
+
invalid_properties.push("invalid value for \"two_factor_code\", must conform to the pattern #{pattern}.")
|
|
132
|
+
end
|
|
133
|
+
|
|
119
134
|
invalid_properties
|
|
120
135
|
end
|
|
121
136
|
|
|
@@ -128,6 +143,9 @@ module ZSGFClient
|
|
|
128
143
|
return false if @verify_code.nil?
|
|
129
144
|
return false if @verify_code.to_s.length < 1
|
|
130
145
|
return false if @verify_code !~ Regexp.new(/\d{4,8}$/)
|
|
146
|
+
return false if !@two_factor_code.nil? && @two_factor_code.to_s.length > 6
|
|
147
|
+
return false if !@two_factor_code.nil? && @two_factor_code.to_s.length < 6
|
|
148
|
+
return false if !@two_factor_code.nil? && @two_factor_code !~ Regexp.new(/^[0-9]*$/)
|
|
131
149
|
true
|
|
132
150
|
end
|
|
133
151
|
|
|
@@ -164,6 +182,25 @@ module ZSGFClient
|
|
|
164
182
|
@verify_code = verify_code
|
|
165
183
|
end
|
|
166
184
|
|
|
185
|
+
# Custom attribute writer method with validation
|
|
186
|
+
# @param [Object] two_factor_code Value to be assigned
|
|
187
|
+
def two_factor_code=(two_factor_code)
|
|
188
|
+
if !two_factor_code.nil? && two_factor_code.to_s.length > 6
|
|
189
|
+
fail ArgumentError, 'invalid value for "two_factor_code", the character length must be smaller than or equal to 6.'
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if !two_factor_code.nil? && two_factor_code.to_s.length < 6
|
|
193
|
+
fail ArgumentError, 'invalid value for "two_factor_code", the character length must be great than or equal to 6.'
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
pattern = Regexp.new(/^[0-9]*$/)
|
|
197
|
+
if !two_factor_code.nil? && two_factor_code !~ pattern
|
|
198
|
+
fail ArgumentError, "invalid value for \"two_factor_code\", must conform to the pattern #{pattern}."
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
@two_factor_code = two_factor_code
|
|
202
|
+
end
|
|
203
|
+
|
|
167
204
|
# Checks equality by comparing each attribute.
|
|
168
205
|
# @param [Object] Object to be compared
|
|
169
206
|
def ==(o)
|
|
@@ -15,23 +15,25 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module ZSGFClient
|
|
17
17
|
class EmailSignUpRequest
|
|
18
|
+
# 用户邮箱地址
|
|
18
19
|
attr_accessor :email
|
|
19
20
|
|
|
21
|
+
# 用户密码,长度为6到32个字符
|
|
20
22
|
attr_accessor :pwd
|
|
21
23
|
|
|
22
24
|
# 邮箱验证码
|
|
23
25
|
attr_accessor :email_code
|
|
24
26
|
|
|
25
|
-
#
|
|
27
|
+
# 手机号,必须为11位数字
|
|
26
28
|
attr_accessor :phone
|
|
27
29
|
|
|
28
30
|
# 手机验证码(只有启用的手机验证码功能时,才需要传入)
|
|
29
31
|
attr_accessor :phone_code
|
|
30
32
|
|
|
31
|
-
#
|
|
33
|
+
# 用户昵称
|
|
32
34
|
attr_accessor :nick_name
|
|
33
35
|
|
|
34
|
-
#
|
|
36
|
+
# 用户头像URL
|
|
35
37
|
attr_accessor :avatar
|
|
36
38
|
|
|
37
39
|
# 自定义数据
|
|
@@ -165,6 +167,11 @@ module ZSGFClient
|
|
|
165
167
|
invalid_properties.push('invalid value for "pwd", the character length must be great than or equal to 6.')
|
|
166
168
|
end
|
|
167
169
|
|
|
170
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_\-!@#$%^&*()]*$/)
|
|
171
|
+
if @pwd !~ pattern
|
|
172
|
+
invalid_properties.push("invalid value for \"pwd\", must conform to the pattern #{pattern}.")
|
|
173
|
+
end
|
|
174
|
+
|
|
168
175
|
pattern = Regexp.new(/\d{4,8}$/)
|
|
169
176
|
if !@email_code.nil? && @email_code !~ pattern
|
|
170
177
|
invalid_properties.push("invalid value for \"email_code\", must conform to the pattern #{pattern}.")
|
|
@@ -180,8 +187,12 @@ module ZSGFClient
|
|
|
180
187
|
invalid_properties.push("invalid value for \"phone_code\", must conform to the pattern #{pattern}.")
|
|
181
188
|
end
|
|
182
189
|
|
|
183
|
-
if !@nick_name.nil? && @nick_name.to_s.length >
|
|
184
|
-
invalid_properties.push('invalid value for "nick_name", the character length must be smaller than or equal to
|
|
190
|
+
if !@nick_name.nil? && @nick_name.to_s.length > 32
|
|
191
|
+
invalid_properties.push('invalid value for "nick_name", the character length must be smaller than or equal to 32.')
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if !@nick_name.nil? && @nick_name.to_s.length < 4
|
|
195
|
+
invalid_properties.push('invalid value for "nick_name", the character length must be great than or equal to 4.')
|
|
185
196
|
end
|
|
186
197
|
|
|
187
198
|
if !@avatar.nil? && @avatar.to_s.length > 999
|
|
@@ -204,10 +215,12 @@ module ZSGFClient
|
|
|
204
215
|
return false if @pwd.nil?
|
|
205
216
|
return false if @pwd.to_s.length > 32
|
|
206
217
|
return false if @pwd.to_s.length < 6
|
|
218
|
+
return false if @pwd !~ Regexp.new(/^[a-zA-Z0-9_\-!@#$%^&*()]*$/)
|
|
207
219
|
return false if !@email_code.nil? && @email_code !~ Regexp.new(/\d{4,8}$/)
|
|
208
220
|
return false if !@phone.nil? && @phone !~ Regexp.new(/^(\d{11})?$/)
|
|
209
221
|
return false if !@phone_code.nil? && @phone_code !~ Regexp.new(/\d{4,8}$/)
|
|
210
|
-
return false if !@nick_name.nil? && @nick_name.to_s.length >
|
|
222
|
+
return false if !@nick_name.nil? && @nick_name.to_s.length > 32
|
|
223
|
+
return false if !@nick_name.nil? && @nick_name.to_s.length < 4
|
|
211
224
|
return false if !@avatar.nil? && @avatar.to_s.length > 999
|
|
212
225
|
return false if !@data.nil? && @data.to_s.length > 9999
|
|
213
226
|
true
|
|
@@ -242,6 +255,11 @@ module ZSGFClient
|
|
|
242
255
|
fail ArgumentError, 'invalid value for "pwd", the character length must be great than or equal to 6.'
|
|
243
256
|
end
|
|
244
257
|
|
|
258
|
+
pattern = Regexp.new(/^[a-zA-Z0-9_\-!@#$%^&*()]*$/)
|
|
259
|
+
if pwd !~ pattern
|
|
260
|
+
fail ArgumentError, "invalid value for \"pwd\", must conform to the pattern #{pattern}."
|
|
261
|
+
end
|
|
262
|
+
|
|
245
263
|
@pwd = pwd
|
|
246
264
|
end
|
|
247
265
|
|
|
@@ -281,8 +299,12 @@ module ZSGFClient
|
|
|
281
299
|
# Custom attribute writer method with validation
|
|
282
300
|
# @param [Object] nick_name Value to be assigned
|
|
283
301
|
def nick_name=(nick_name)
|
|
284
|
-
if !nick_name.nil? && nick_name.to_s.length >
|
|
285
|
-
fail ArgumentError, 'invalid value for "nick_name", the character length must be smaller than or equal to
|
|
302
|
+
if !nick_name.nil? && nick_name.to_s.length > 32
|
|
303
|
+
fail ArgumentError, 'invalid value for "nick_name", the character length must be smaller than or equal to 32.'
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
if !nick_name.nil? && nick_name.to_s.length < 4
|
|
307
|
+
fail ArgumentError, 'invalid value for "nick_name", the character length must be great than or equal to 4.'
|
|
286
308
|
end
|
|
287
309
|
|
|
288
310
|
@nick_name = nick_name
|
|
@@ -15,28 +15,40 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module ZSGFClient
|
|
17
17
|
class FollowerModel
|
|
18
|
+
# 用户ID
|
|
18
19
|
attr_accessor :id
|
|
19
20
|
|
|
21
|
+
# 目标用户ID
|
|
20
22
|
attr_accessor :target_user_id
|
|
21
23
|
|
|
24
|
+
# 别名
|
|
22
25
|
attr_accessor :_alias
|
|
23
26
|
|
|
27
|
+
# 昵称
|
|
24
28
|
attr_accessor :nick_name
|
|
25
29
|
|
|
30
|
+
# 头像
|
|
26
31
|
attr_accessor :avatar
|
|
27
32
|
|
|
33
|
+
# 是否互相关注
|
|
28
34
|
attr_accessor :is_mutual
|
|
29
35
|
|
|
36
|
+
# 亲密度分数
|
|
30
37
|
attr_accessor :closeness_score
|
|
31
38
|
|
|
39
|
+
# 关注度分数
|
|
32
40
|
attr_accessor :attention_score
|
|
33
41
|
|
|
42
|
+
# 标签
|
|
34
43
|
attr_accessor :tags
|
|
35
44
|
|
|
45
|
+
# 状态
|
|
36
46
|
attr_accessor :status
|
|
37
47
|
|
|
48
|
+
# 备注
|
|
38
49
|
attr_accessor :remark
|
|
39
50
|
|
|
51
|
+
# 创建日期
|
|
40
52
|
attr_accessor :create_date
|
|
41
53
|
|
|
42
54
|
# Attribute mapping from ruby-style variable name to JSON key.
|