Skip to content

Commit ca6a3b1

Browse files
committed
new constructor for WeatherOptions
1 parent 4877090 commit ca6a3b1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Sources/AgroAPI/AgroWeather.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ public class WeatherOptions {
149149
self.end = end
150150
}
151151

152+
public init(polygon_id: String, start: Date, end: Date) {
153+
self.polygon_id = polygon_id
154+
self.start = Int(start.timeIntervalSince1970)
155+
self.end = Int(end.timeIntervalSince1970)
156+
}
157+
152158
public func toParamString() -> String {
153159
var stringer = ""
154160
stringer += "polygon_id=" + polygon_id

0 commit comments

Comments
 (0)