Ejemplo n.º 1
0
 public Event(
     string date,
     int duration,
     int eventId,
     int importance,
     int ownerId,
     string ownerName,
     Enums.Calendar.OwnerType ownerType,
     Enums.Calendar.EventResponses response,
     string text,
     string title)
 {
     Date       = date;
     Duration   = duration;
     EventId    = eventId;
     Importance = importance;
     OwnerId    = ownerId;
     OwnerName  = ownerName;
     OwnerType  = ownerType;
     Response   = response;
     Text       = text;
     Title      = title;
 }
Ejemplo n.º 2
0
        public async Task <EsiResponse <string> > RespondToEvent(int characterId, int eventId, Enums.Calendar.EventResponses eventResponse)
        {
            var url = new Url(_baseUrl)
                      .AppendPathSegments("characters", characterId, eventId);

            if (eventResponse is Enums.Calendar.EventResponses.NotResponded)
            {
                throw new ArgumentOutOfRangeException(
                          nameof(eventResponse),
                          "Cannot respond to an event with the NotResponded response");
            }

            var response = await _dataService.PutAsync(url, eventResponse.ToString().ToLower());

            return(_responseFactory.Create <string>(response));
        }