@@ -74,7 +74,7 @@ public struct StudyplusRecord {
74
74
The seconds of the learning.
75
75
勉強した時間(秒数)です。
76
76
*/
77
- public let duration : Double
77
+ public let duration : Int
78
78
79
79
/**
80
80
The date and time of learning.
@@ -105,8 +105,26 @@ public struct StudyplusRecord {
105
105
/// - recordedAt: Time the learning is ended. 学習を終えた日時。
106
106
/// - amount: The amount of learning. 学習量。
107
107
/// - comment: Studyplus timeline comment. Studyplusのタイムライン上で表示されるコメント。
108
+ @available ( * , deprecated, message: " Use Int type duration initializer instead " )
108
109
public init ( duration: Double , recordedAt: Date = Date ( ) , amount: StudyplusRecordAmount ? = nil , comment: String ? = nil ) {
109
110
111
+ self . duration = Int ( duration)
112
+ self . recordedAt = recordedAt
113
+ self . amount = amount
114
+ self . comment = comment
115
+ }
116
+
117
+ /// Initialize StudyplusRecord object.
118
+ ///
119
+ /// 勉強記録オブジェクトを作成します。
120
+ ///
121
+ /// - Parameters:
122
+ /// - duration: Specify the seconds of the learning. 勉強した時間(秒数)を指定してください。
123
+ /// - recordedAt: Time the learning is ended. 学習を終えた日時。
124
+ /// - amount: The amount of learning. 学習量。
125
+ /// - comment: Studyplus timeline comment. Studyplusのタイムライン上で表示されるコメント。
126
+ public init ( duration: Int , recordedAt: Date = Date ( ) , amount: StudyplusRecordAmount ? = nil , comment: String ? = nil ) {
127
+
110
128
self . duration = duration
111
129
self . recordedAt = recordedAt
112
130
self . amount = amount
0 commit comments