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));
        }
Exemple #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;
        }
Exemple #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;
        }
Exemple #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());
 }
Exemple #10
0
 public Event(EventbriteContext context) : base(context) { }
Exemple #11
0
 public Event(EventbriteContext context) : base(context)
 {
 }
Exemple #12
0
 public OrganizerEventsBuilder(EventbriteContext context) : base(context)
 {
 }
Exemple #13
0
 public AttendeesRequestHandler(EventbriteContext context) : base(context)
 {
 }
Exemple #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
        }
Exemple #15
0
 public BuilderBase(EventbriteContext context)
 {
     this.Context = context;
 }
 public BuilderBase(EventbriteContext context)
 {
     this.Context = context;
 }
Exemple #17
0
 public AttendeeSearchEventbriteRequest(EventbriteContext context, double eventId, BaseSearchCriterias criterias)
     : base(string.Format(Path, eventId), context, criterias.ToNameValueCollection())
 {
 }
Exemple #18
0
 public Attendee(EventbriteContext context) : base(context) { }
Exemple #19
0
 public Barcode(EventbriteContext context): base(context) { }
 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());
 }
Exemple #23
0
 public Organizer(long id, EventbriteContext context) : base(context)
 {
     this.id = id;
 }
Exemple #24
0
 public EntityBase(EventbriteContext context)
 {
     this.Context = context;
 }
Exemple #25
0
 public EventRequestHander(EventbriteContext context) : base(context)
 {
 }
Exemple #26
0
 public Venue(EventbriteContext context)
     : base(context)
 {
 }
 public EventRequest(long id, EventbriteContext context)
     : base(PATH, context)
 {
     this.AddGet("id", id.ToString());
 }
Exemple #28
0
 public AccessCodeRequestHandler(EventbriteContext context) : base(context)
 {
 }
 public VenueBuilder(EventbriteContext context) : base(context)
 {
 }
Exemple #30
0
 public VenueBuilder(EventbriteContext context) : base(context) { }
Exemple #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>();
 }
Exemple #34
0
 public EntityBase(EventbriteContext context)
 {
     this.Context = context;
 }
 public VenueRequest(EventbriteContext context, long venueId)
     : base(string.Format(Path, venueId), context)
 {
 }
 public EventSearchEventbriteRequest(EventbriteContext context, BaseSearchCriterias criterias)
     : base(Path, context, criterias.ToNameValueCollection())
 {
 }
Exemple #37
0
 public EventbriteContextTest()
 {
     Context = new EventbriteContext(FakeAppKey, Constants.MockServerUrl);
 }
Exemple #38
0
 public Attendee(EventbriteContext context) : base(context)
 {
 }
 public void Init()
 {
     Context = new EventbriteContext(EventbriteVariables.Token);
 }
		public EventSearchBuilder(EventbriteContext context)
			: base(context)
		{
		}
Exemple #41
0
 public EventOrganizerBuilder(EventbriteContext context) : base(context)
 {
 }
Exemple #42
0
 public TicketClassRequestHander(EventbriteContext context) : base(context)
 {
 }
Exemple #43
0
 public Ticket(EventbriteContext context) : base(context) { }
 public EventAttendeesBuilder(EventbriteContext context) : base(context)
 {
 }
Exemple #45
0
 public Ticket(EventbriteContext context) : base(context)
 {
 }
Exemple #46
0
 public User(EventbriteContext context)
 {
     this._context = context;
 }
 public TicketBuilder(EventbriteContext context) : base(context) { }
 public VenueRequestHandler(EventbriteContext context) : base(context)
 {
 }
Exemple #49
0
 public Organizer(long id, EventbriteContext context) : base(context)
 {
     this.id = id;
 }
Exemple #50
0
 public EventRequest(Dictionary <string, string> queryParameters, EventbriteContext context)
     : base(PATH, context)
 {
     //  this.AddGet("id", id.ToString());
 }
 public AttendeeBuilder(EventbriteContext context) : base(context) { }
 public OrganizerEventsBuilder(EventbriteContext context) : base(context) { }
Exemple #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));
 }