public EventAttendeesRequest(long eventId, EventbriteContext context)
     : base(PATH, context)
 {
     this.AddGet("id", eventId.ToString());
     if (this.Context.ShowFullBarcodes)
         this.AddGet("show_full_barcodes", "true");
 }
		public EventSearchRequest(EventSearchFilter request, EventbriteContext context) 
			: base(PATH, context)
		{
			if (request == null)
				throw new ArgumentNullException("request");

			IDictionary<string, string> query = request.ToParams();
			if (query != null && query.Count > 0)
			{
				foreach (var p in query)
					this.AddGet(p.Key, p.Value);
			}
		}
        public ActionResult Index()
        {
            List <InviteEvent>       Events    = new List <InviteEvent>();
            EventbriteContext        context   = new EventbriteContext(eventbriteApiKey, eventbriteUserKey);
            Organizer                organizer = context.GetOrganizer(eventbriteOrginizerId);
            Dictionary <long, Event> ebevents  = organizer.Events;

            if (ebevents.Count > 0)
            {
                Events = (from e in ebevents where e.Value.EndDateTime >= DateTime.Now select new InviteEvent(e.Value)).ToList();
            }
            return(View(Events));
        }
Beispiel #4
0
        public RequestBase(string path, EventbriteContext context)
        {
            this.Context = context;

            this.GetParameters = new Dictionary<string, string>();
            this.AddGet("app_key", context.AppKey);

            if (context.UserKey != null)
            {
                this.AddGet("user_key", context.UserKey);
            }
            
            this.Path = path;
        }
Beispiel #5
0
        public RequestBase(string path, EventbriteContext context)
        {
            this.Context = context;

            this.GetParameters = new Dictionary <string, string>();
            this.AddGet("app_key", context.AppKey);

            if (context.UserKey != null)
            {
                this.AddGet("user_key", context.UserKey);
            }

            this.Path = path;
        }
        public RequestBase(string path, EventbriteContext context)
        {
            this.Context = context;

            this.GetParameters = new Dictionary <string, string>();
            if (!string.IsNullOrWhiteSpace(context.AppKey))
            {
                this.AddGet("app_key", context.AppKey);
            }
            this.AddGet("Authorization", $"Bearer {context.OAuthToken}");

            if (context.UserKey != null)
            {
                this.AddGet("user_key", context.UserKey);
            }

            this.Path = path;
        }
Beispiel #7
0
        public List <Attendee> GetAttendees(double eventId)
        {
            if (cacheAttendee.Count == 0)
            {
                var eventbriteContext = new EventbriteContext(eventbriteConfig.AppKey);
                var criterias         = new AttendeeSearchCriterias()
                                        .Status(AttendeeSearchCriterias.AttendeeStatus.Attending);

                var result = eventbriteContext.GetAttendees(eventId, criterias);
                cacheAttendee.AddRange(result.Attendees);
                for (int i = 2; i <= result.Pagination.PageCount; i++)
                {
                    criterias = new AttendeeSearchCriterias()
                                .Status(AttendeeSearchCriterias.AttendeeStatus.Attending)
                                .Page(i);
                    result = eventbriteContext.GetAttendees(eventId, criterias);
                    cacheAttendee.AddRange(result.Attendees);
                }
            }
            return(cacheAttendee);
        }
        public ActionResult GetEvents(int type, double start, double end)
        {
            CalendarType         calendarType = CalendarTypes.Where(ct => ct.id == type).FirstOrDefault();
            DateTime             fromDate     = ConvertFromUnixTimestamp(start);
            DateTime             toDate       = ConvertFromUnixTimestamp(end);
            List <CalendarEvent> events       = new List <CalendarEvent>();
            List <string>        toLoad       = new List <string>();

            switch (calendarType.value)
            {
            case "Followup":
            case "Meetings":
            case "Dreams":
            case "Goals":
                toLoad.Add(calendarType.value);
                break;

            case "All":
            default:
                toLoad.Add("Followup");
                toLoad.Add("Meetings");
                toLoad.Add("Dreams");
                toLoad.Add("Goals");
                break;
            }
            if (toLoad.Count > 0)
            {
                List <CalendarEvent> tempEvents = new List <CalendarEvent>();
                if (toLoad.Contains("Meetings") == true)
                {
                    EventbriteContext        context   = new EventbriteContext(eventbriteApiKey, eventbriteUserKey);
                    Organizer                organizer = context.GetOrganizer(eventbriteOrginizerId);
                    Dictionary <long, Event> ebevents  = organizer.Events;
                    if (ebevents.Count > 0)
                    {
                        tempEvents = (from e in ebevents where e.Value.StartDateTime >= DateTime.Now && e.Value.EndDateTime <= toDate select new CalendarEvent(e.Value)).ToList();
                        events.AddRange(tempEvents);
                    }
                }
                if (toLoad.Contains("Followup") == true)
                {
                    List <ContactFollowup> followups = IBOVirtualAPI.GetFollowups(ibo.IBONum, fromDate.ToString(), toDate.ToString());
                    if (followups.Count > 0)
                    {
                        tempEvents = (from e in followups where e.datetime >= fromDate select new CalendarEvent(e)).ToList();
                        events.AddRange(tempEvents);
                    }
                }
                if (toLoad.Contains("Dreams") == true)
                {
                    /*  TODO: Create API methods that support date filtering */
                    List <Dream> dreams = IBOVirtualAPI.GetDreamsUser(ibo.IBONum);
                    if (dreams.Count > 0)
                    {
                        tempEvents = (from e in dreams where e.datetime >= fromDate select new CalendarEvent(e)).ToList();
                        events.AddRange(tempEvents);
                    }
                }
                if (toLoad.Contains("Goals") == true)
                {
                    /*  TODO: Create API methods that support date filtering */
                    List <Goal> goals = IBOVirtualAPI.GetIBOGoals(ibo.IBONum);
                    if (goals.Count > 0)
                    {
                        tempEvents = (from e in goals where e.datetime >= fromDate select new CalendarEvent(e)).ToList();
                        events.AddRange(tempEvents);
                    }
                }
            }
            return(Json(events.ToArray(), JsonRequestBehavior.AllowGet));
        }
 public OrganizerEventsRequest(long organiserId, EventbriteContext context)
     : base(PATH, context)
 {
     this.AddGet("id", organiserId.ToString());
 }
Beispiel #10
0
 public Event(EventbriteContext context) : base(context) { }
Beispiel #11
0
 public Event(EventbriteContext context) : base(context)
 {
 }
Beispiel #12
0
 public OrganizerEventsBuilder(EventbriteContext context) : base(context)
 {
 }
Beispiel #13
0
 public AttendeesRequestHandler(EventbriteContext context) : base(context)
 {
 }
Beispiel #14
0
        static void Main(string[] args)
        {
            var eventbriteNET = new EventbriteContext("LLGPFYIY2UBUUHOK5DP6");


            var users = eventbriteNET.Get <User>();

            Console.WriteLine(users.Count);

            var user = users[0];

            Console.WriteLine(user.Emails.Count);
            Console.WriteLine(user.Name);
            Console.WriteLine(user.FirstName);
            Console.WriteLine(user.LastName);


            //var ebEvents = eventbriteNET.Get<Event>().ToList();

            //var pagedEvents = eventbriteNET.GetOwnedEvents();

            var pagedEvents = eventbriteNET.Search();

            eventbriteNET.Pagination = pagedEvents.Pagination;

            var ebEvents = pagedEvents.Events;

            Console.WriteLine(string.Format("Pagination: ObjectCount {0} PageCount {1} PageNumber {2} PageSize {3}", eventbriteNET.Pagination.ObjectCount, eventbriteNET.Pagination.PageCount, eventbriteNET.Pagination.PageNumber, eventbriteNET.Pagination.PageSize));
            ebEvents.ForEach(e =>
            {
                Console.WriteLine(string.Format("{0} {1} {2}", e.Description.Text, e.Start.Local, e.End.Local));
                eventbriteNET.EventId = e.Id;

                Console.WriteLine(string.Format("Location {0}", e.OnlineEvent ? "Online Event" : string.Format("{0} {1} {2}", e.VenueId, e.Venue.Address.Address1, e.Venue.Address.City)));
                if (!e.OnlineEvent)
                {
                    var venuue = eventbriteNET.Get <Venue>(e.VenueId ?? 0);
                    e.Venue    = venuue;
                    Console.WriteLine(e.Venue.ResourceUri);
                    Console.WriteLine(string.Format("Location {0}", e.Venue.Name));
                }



                var attendees = eventbriteNET.Get <Attendee>().ToList();

                Console.WriteLine(string.Format("Attendee Pagination: ObjectCount {0} PageCount {1} PageNumber {2} PageSize {3}", eventbriteNET.Pagination.ObjectCount, eventbriteNET.Pagination.PageCount, eventbriteNET.Pagination.PageNumber, eventbriteNET.Pagination.PageSize));

                Console.WriteLine(string.Format("Attendees {0}", attendees.Count));



                attendees.ForEach(a => Console.WriteLine(a.profile.email));
            });

            //


            Console.ReadLine();
            // eventbriteNET.Get<List<Event>>("")
            // Console
        }
Beispiel #15
0
 public BuilderBase(EventbriteContext context)
 {
     this.Context = context;
 }
Beispiel #16
0
 public BuilderBase(EventbriteContext context)
 {
     this.Context = context;
 }
Beispiel #17
0
 public AttendeeSearchEventbriteRequest(EventbriteContext context, double eventId, BaseSearchCriterias criterias)
     : base(string.Format(Path, eventId), context, criterias.ToNameValueCollection())
 {
 }
Beispiel #18
0
 public Attendee(EventbriteContext context) : base(context) { }
Beispiel #19
0
 public Barcode(EventbriteContext context): base(context) { }
Beispiel #20
0
 public BarcodeBuilder(EventbriteContext context) : base(context) { }
 public OrganizerEventsRequest(int organiserId, EventbriteContext context)
     : base(PATH, context)
 {
     this.AddGet("id", organiserId.ToString());
 }
 public EventAttendeesRequest(long eventId, EventbriteContext context)
     : base(PATH, context)
 {
     this.AddGet("id", eventId.ToString());
 }
Beispiel #23
0
 public Organizer(long id, EventbriteContext context) : base(context)
 {
     this.id = id;
 }
Beispiel #24
0
 public EntityBase(EventbriteContext context)
 {
     this.Context = context;
 }
Beispiel #25
0
 public EventRequestHander(EventbriteContext context) : base(context)
 {
 }
Beispiel #26
0
 public Venue(EventbriteContext context)
     : base(context)
 {
 }
Beispiel #27
0
 public EventRequest(long id, EventbriteContext context)
     : base(PATH, context)
 {
     this.AddGet("id", id.ToString());
 }
Beispiel #28
0
 public AccessCodeRequestHandler(EventbriteContext context) : base(context)
 {
 }
Beispiel #29
0
 public VenueBuilder(EventbriteContext context) : base(context)
 {
 }
Beispiel #30
0
 public VenueBuilder(EventbriteContext context) : base(context) { }
Beispiel #31
0
 public EventRequest(int id, EventbriteContext context)
     : base(PATH, context)
 {
     this.AddGet("id", id.ToString());
 }
 public UserEventsBuilder(EventbriteContext context) : base(context) { }
 public RequestBase(EventbriteContext context)
 {
     this.Context           = context;
     this.BaseUrl           = new Uri(context.Host);
     this.DefaultParameters = new List <Parameter>();
 }
Beispiel #34
0
 public EntityBase(EventbriteContext context)
 {
     this.Context = context;
 }
Beispiel #35
0
 public VenueRequest(EventbriteContext context, long venueId)
     : base(string.Format(Path, venueId), context)
 {
 }
 public EventSearchEventbriteRequest(EventbriteContext context, BaseSearchCriterias criterias)
     : base(Path, context, criterias.ToNameValueCollection())
 {
 }
Beispiel #37
0
 public EventbriteContextTest()
 {
     Context = new EventbriteContext(FakeAppKey, Constants.MockServerUrl);
 }
Beispiel #38
0
 public Attendee(EventbriteContext context) : base(context)
 {
 }
Beispiel #39
0
 public void Init()
 {
     Context = new EventbriteContext(EventbriteVariables.Token);
 }
		public EventSearchBuilder(EventbriteContext context)
			: base(context)
		{
		}
Beispiel #41
0
 public EventOrganizerBuilder(EventbriteContext context) : base(context)
 {
 }
Beispiel #42
0
 public TicketClassRequestHander(EventbriteContext context) : base(context)
 {
 }
Beispiel #43
0
 public Ticket(EventbriteContext context) : base(context) { }
 public EventAttendeesBuilder(EventbriteContext context) : base(context)
 {
 }
Beispiel #45
0
 public Ticket(EventbriteContext context) : base(context)
 {
 }
Beispiel #46
0
 public User(EventbriteContext context)
 {
     this._context = context;
 }
Beispiel #47
0
 public TicketBuilder(EventbriteContext context) : base(context) { }
 public VenueRequestHandler(EventbriteContext context) : base(context)
 {
 }
Beispiel #49
0
 public Organizer(long id, EventbriteContext context) : base(context)
 {
     this.id = id;
 }
Beispiel #50
0
 public EventRequest(Dictionary <string, string> queryParameters, EventbriteContext context)
     : base(PATH, context)
 {
     //  this.AddGet("id", id.ToString());
 }
Beispiel #51
0
 public AttendeeBuilder(EventbriteContext context) : base(context) { }
 public OrganizerEventsBuilder(EventbriteContext context) : base(context) { }
Beispiel #53
0
 public TicketBuilder(EventbriteContext context) : base(context)
 {
 }
 public UserEventsRequest( EventbriteContext context, string[] statuses =null)
     : base(PATH, context)
 {
     //statuses = statuses ?? new string[] {"live", "started"};
     //this.AddGet("event_statuses", String.Join(",", statuses));
 }