SippoClient

This section explains Meetings behaviour

Create a Meeting

// Participant to send the meeting
let participant = MeetingInvitation.Participant(email: "participant@example.com")
let invitation = MeetingInvitation(name: "aMeeting",                                                                              participants: [participant],
                                   language: "es",
                                   sendInvites: true)

let meetings = try? SippoClient.client.meetings.get()
meetings?.createMeeting(with: invitation) { result in
    switch result {
    case let .success(meeting):
        print("Do something with meeting: \(meeting)")
    case let .failure(error):
        print("Do something with error: \(error)")
    }
}

Fetch user meetings

let meetings = try? SippoClient.client.meetings.get()
meetings?.meetings { result in
    switch result {
    case let .success(userMeetings):
        print("Do something with meeetings: \(userMeetings)")
    case let .failure(error):
        print("Do something with error: \(error)")
    }
}

Update a Meeting

let participant = MeetingInvitation.Participant(email: "participant@example.com")
let invitation = MeetingInvitation(name: "anUpdatedMeeting",
                                    participants: [participant],
                                    language: "en",
                                    sendInvites: true)
let meetings = try? SippoClient.client.meetings.get()
meetings?.updateMeeting(withId: "meetingId", using: invitation) { result in
    switch result {
    case let .success(meeting):
        print("Do something with meeting: \(meeting)")
    case let .failure(error):
        print("Do something with error: \(error)")
    }
}

Delete a Meeting

var meetingToDelete: Meeting!
let meetings = try? SippoClient.client.meetings.get()

meetings?.delete(meeting: meetingToDelete) { result in

}

Join to Meeting

var meetingToJoin: Meeting!
let meetings = try? SippoClient.client.meetings.get()

meetings?.join(meeting: meetingToJoin) { result in
    result.map { conference in
        conference.join { result in
            // User is joined to meeting conference
        }
    }
}