Giter VIP home page Giter VIP logo

essentials's People

Contributors

alfredmyers avatar appsourcers avatar charlespetzold avatar conceptdev avatar dend avatar dotmorten avatar eilon avatar ep01 avatar f1nzer avatar fenxu avatar fredeil avatar jamesmontemagno avatar joelmartinez avatar jonathanpeppers avatar jzeferino avatar knocte avatar kzu avatar manishkungwani avatar manutdkid77 avatar mattleibow avatar mattregul avatar moljac avatar mrlacey avatar newky2k avatar nickrandolph avatar patridge avatar powerhelmsman avatar redth avatar scottbtr avatar thudugala avatar

Watchers

 avatar

essentials's Issues

Alter/Remove try-catch rethrow exceptions

Remove or alter what is being thrown e.g. sometimes I add what platform is failing, but probably just better off not catching exception in general if I'm not handling it

Add more null validation

Calendar.android.cs

e.g. newEvent null validation in:
if (string.IsNullOrEmpty(newEvent.CalendarId))

Build unit tests for new Xamarin request calendars functionality

  • Retrieving Calendars
  • Retrieving Events
  • Retrieving Events by Calendar Id
  • Retrieving Event by Event Id
  • Creating a Calendar
  • Creating an Event
  • Deleting an Event
  • Adding Attendee to an Event
  • Removing Attendee from an Event
  • Adding Alarm to an Event
  • Removing Alarm from an Event
  • Creating Event with Daily Recurrence
  • Creating Event with Weekly Recurrence
  • Creating Event with Monthly Recurrence
  • Creating Event with Yearly Recurrence
  • Creating a Event Instance
  • Deleting a Event Instance
  • Delete event instances from date

Delete calendar event booking

  • UWP - I can cancel an event, but deletion looks like it may require going via the opening the windows calendar route
  • iOS
  • Android

Add Event Create/Update/Delete access for existing Calendar API

Calendar API

Calendar API Update to no longer be read-only but will now have CRUD access to events for calendars seamlessly across uwp, iOS and Android.

API

Calendar

Methods

API Description
Task<IEnumerable<DeviceCalendar>> GetCalendarsAsync() Retrieve all calendars for device
Task<IEnumerable<DeviceEvent>> GetEventsAsync( string calendarId = null, DateTimeOffset? startDate = null, DateTimeOffset? endDate = null) Retrieve all events for a specified range/calendar, null will use defaults: calendarId will default to all Calendars retrieved, startDate will default to use, DefaultStartDate , endDate will default to use DefaultEndDate
Task<DeviceEvent> GetEventByIdAsync(string eventId) Gets more detailed information about a specific event by the event id
Task<string> CreateEvent(DeviceEvent newEvent) Create event with parameters passed in via newEvent, returns id of created event.
Task<bool> UpdateEvent(DeviceEvent updatedEvent) Update event to match parameters provided via updatedEvent, returns bool indicating whether update was successful.
Task<bool> DeleteEvent(string eventId) Delete event by Id, returns bool indicating whether deletion was successful
Task<bool> AddAttendee(DeviceEventAttendee newAttendee, string eventId) Add a new attendee to an event by event Id, returns bool indicating whether adding the attendee was successful.
Task<bool> RemoveAttendee(string attendeeEmail, string eventId) Remove attendee from event based on attendee email and event Id, returns bool indicating whether removing attendee from event was successful

Classes

public class DeviceCalendar
{
    public string Id { get; set; }

    public string Name { get; set; }

    public bool IsReadOnly { get; set; }
}

public class DeviceEvent
{
    public string Id { get; set; }

    public string CalendarId { get; set; }

    public string Title { get; set; }

    public string Description { get; set; }

    public string Location { get; set; }

    public bool AllDay { get; set; }

    public DateTimeOffset StartDate { get; set; }

     public TimeSpan? Duration { get; set; }

    public DateTimeOffset? EndDate { get; set; }

    public IEnumberable<Attendee> Attendees { get; set; }
}

public class DeviceEventAttendee
{
    public string Name { get; set; }

    public string Email { get; set; }
}

Scenarios

  • User wants to an event.
  • User wants to update an event.
  • User wants to delete an event.
  • User wants to add more attendees to an existing event.
  • User wants to remove attendees from an existing event.

Platform Compatibility

  • Target Frameworks:
    • iOS: Support on iOS for the API
    • Android: Support on Android for the API
    • UWP: Support on UWP for the API

Backward Compatibility

Difficulty : medium

Request permissions to access calendar app

Allow functions to request/check Calendar app permissions before proceeding.

This should be a modification to the existing Permissions API to support requesting Calendar permission. We'll need to add Calendar to the PermissionType enumeration

Should End Date be exactly 1 day after start date/is end date required when all day

eventValues.Put(CalendarContract.Events.InterfaceConsts.Dtend, newEvent.EndDate.HasValue ? newEvent.EndDate.Value.ToUnixTimeMilliseconds().ToString() : newEvent.StartDate.AddDays(1).ToString());

It looks pretty arbitrary that we're adding a day if the end date hasn't been provided. Couple of questions:

Should we be even providing an end date if it's not provided?
Why are we adding exactly 1 day?
If we need to provide a value and it will be an arbitrary number, I feel that we might want to leave a comment why about it.

Calendar Read-Only (for now) API

Calendar Read-Only API

Calendar API for reading calendar/event information seamlessly across uwp, iOS and Android

API

Calendar

Methods

API Description
Task<IReadOnlyList<ICalendar>> GetCalendarsAsync() Retrieve all calendars for device
Task<IReadOnlyList<IEvent>> GetEventsAsync( string calendarId = null, DateTimeOffset? startDate = null, DateTimeOffset? endDate = null) Retrieve all events for a specified range/calendar, null will use defaults: calendarId will default to all Calendars retrieved, startDate will default to use, DefaultStartDate , endDate will default to use DefaultEndDate
Task<IEvent> GetEventByIdAsync(string eventId) Gets more detailed information about a specific event by the event id

Classes

public class DeviceCalendar
{
    public string Id { get; set; }

    public string Name { get; set; }
}

public class DeviceEvent
{
    public string Id { get; set; }

    public string CalendarId { get; set; }

    public string Title { get; set; }

    public string Description { get; set; }

    public string Location { get; set; }

    public bool AllDay
    {
        get => !EndDate.HasValue;
        set
        {
            if (value)
            {
                EndDate = null;
            }
            else
            {
                EndDate = StartDate;
            }
        }
    }

    public DateTimeOffset StartDate { get; set; }

     public TimeSpan? Duration
     {
         get => EndDate.HasValue ? EndDate - StartDate : null;
         set
         {
             if (value.HasValue)
             {
                 EndDate = StartDate.Add(value.Value);
             }
             else
             {
                 EndDate = null;
             }
         }
     }

    public DateTimeOffset? EndDate { get; set; }

    public List<Attendee> Attendees { get; set; }
}

public class DeviceEventAttendee
{
    public string Name { get; set; }

    public string Email { get; set; }
}

Scenarios

  • User wants to see upcoming events.
  • User wants to see who is attending an upcoming event.
  • User wants to know when they will be free.

Platform Compatibility

  • Target Frameworks:
    • iOS: Support on iOS for the API
    • Android: Support on Android for the API
    • UWP: Support on UWP for the API

Backward Compatibility

Difficulty : low

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.