get the URL for pasring the dav data
This commit is contained in:
@@ -28,6 +28,7 @@ func init_dav_client() {
|
|||||||
|
|
||||||
type Calandar struct {
|
type Calandar struct {
|
||||||
DisplayName string
|
DisplayName string
|
||||||
|
Link string
|
||||||
}
|
}
|
||||||
|
|
||||||
type SimpleCalDavData struct {
|
type SimpleCalDavData struct {
|
||||||
@@ -74,6 +75,7 @@ func get_caldav_data(username string, password string) SimpleCalDavData {
|
|||||||
|
|
||||||
var new_cal Calandar = Calandar{
|
var new_cal Calandar = Calandar{
|
||||||
DisplayName: davResp.Responses[i].PropStat[0].Prop.DisplayName,
|
DisplayName: davResp.Responses[i].PropStat[0].Prop.DisplayName,
|
||||||
|
Link: serverConfig.URL + davResp.Responses[i].Href,
|
||||||
}
|
}
|
||||||
|
|
||||||
calandars = append(calandars, new_cal)
|
calandars = append(calandars, new_cal)
|
||||||
|
|||||||
@@ -13,5 +13,6 @@ func main() {
|
|||||||
fmt.Printf("Calandar Count: %d\n", len(calDavData.Calandars))
|
fmt.Printf("Calandar Count: %d\n", len(calDavData.Calandars))
|
||||||
for i := range len(calDavData.Calandars) {
|
for i := range len(calDavData.Calandars) {
|
||||||
fmt.Printf("Cal %d is named %s\n", i, calDavData.Calandars[i].DisplayName)
|
fmt.Printf("Cal %d is named %s\n", i, calDavData.Calandars[i].DisplayName)
|
||||||
|
fmt.Printf("\tLink to cal: %s\n", calDavData.Calandars[i].Link)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user