@@ -55,14 +55,14 @@ final public class Studyplus {
55
55
56
56
StudyplusAPI用のConsumer Keyです。
57
57
*/
58
- public let consumerKey : String
58
+ public private ( set ) var consumerKey : String
59
59
60
60
/**
61
61
Consumer Secret for Studyplus API.
62
62
63
63
StudyplusAPI用のConsumer Secretです。
64
64
*/
65
- public let consumerSecret : String
65
+ public private ( set ) var consumerSecret : String
66
66
67
67
/**
68
68
see StudyplusLoginDelegate protocol
@@ -225,6 +225,25 @@ final public class Studyplus {
225
225
return true
226
226
}
227
227
228
+ /// Change the consumer key and secret.
229
+ /// You can call this method to switch to a different key when logging in to Studyplus or posting study records.
230
+ /// If multiple applications are connected with Studyplus, you need to call this method.
231
+ /// If there is only one connected application, you do not need to call this method.
232
+ ///
233
+ /// StudyplusAPI用のConsumer Key と Secret を変更します。
234
+ /// このメソッドを呼ぶと、Studyplusにログインしたり、勉強記録を投稿するときに別の Consumer Key と Secret に切り替えることができます。
235
+ /// 複数のアプリケーションがStudyplusと連携されている場合は、このメソッドを呼ぶ必要があります。
236
+ /// 連携されたアプリケーションが1つしかない場合は、このメソッドを呼ぶ必要はありません。
237
+ ///
238
+ /// - Parameter
239
+ /// - consumerKey: consumer key
240
+ /// - consumerSecret: consumer secret
241
+ public func change( consumerKey: String , consumerSecret: String ) {
242
+
243
+ self . consumerKey = consumerKey
244
+ self . consumerSecret = consumerSecret
245
+ }
246
+
228
247
// MARK: - private method
229
248
230
249
private init ( ) {
0 commit comments