Skip to content

software-mansion-labs/elixir-caldav-client-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elixir CalDAV Client Demo

This is a demo of Elixir CalDAV Client library.

First, install the dependencies:

mix deps.get

Then create a configuration file from the template:

cp .env.example .env

Edit the .env file and fill the credentials:

code .env

It is recommended to create a new calendar for the purposes this demo.

For iCloud Calendar, follow this tutorial. First, generate an app-specific password, then find out the server address and calendar URL (another tutorial).

For Google Calendar it is necessary to create a client ID and use OAuth 2.0 authentication scheme (however it has not been tested yet).

Finally, launch the Elixir console with environmental variables loaded from .env file:

set -a && source .env && set +a && iex -S mix

You may add an example recurring event to your calendar with:

iex(1)> CalDAVClientDemo.create_event()

You can list all the events in March 2021 by calling:

iex(2)> CalDAVClientDemo.get_events()

Finally, you may delete the example event using:

iex(3)> CalDAVClientDemo.delete_event()

Make sure to recompile the source code after modification to see the changes.

iex(4)> recompile

Copyright and License

Copyright 2021, Software Mansion

Software Mansion

The code located in this repository is licensed under the Apache License, Version 2.0.