Skip to content

add the-events-calendar endpoint#621

Open
drewvolz wants to merge 9 commits intomasterfrom
drew/the-events-calendar
Open

add the-events-calendar endpoint#621
drewvolz wants to merge 9 commits intomasterfrom
drew/the-events-calendar

Conversation

@drewvolz
Copy link
Copy Markdown
Member

@drewvolz drewvolz commented Jul 10, 2022

What this accomplishes

  • A starting point to build UI against at /calendar/named/stolaf-tec
  • Most likely needs data to be transformed into camelcase

Future scope

  • app.quicktype.io we will need to transform the property names into camelcase still
quicktype types (needs cleanup)
export interface Events {
    events:        Event[];
    rest_url:      string;
    next_rest_url: string;
    total:         number;
    total_pages:   number;
}

export interface Event {
    id:                     number;
    global_id:              string;
    global_id_lineage:      string[];
    author:                 string;
    status:                 Status;
    date:                   Date;
    date_utc:               Date;
    modified:               Date;
    modified_utc:           Date;
    url:                    string;
    rest_url:               string;
    title:                  string;
    description:            string;
    excerpt:                string;
    slug:                   string;
    image:                  boolean;
    all_day:                boolean;
    start_date:             Date;
    start_date_details:     DateDetails;
    end_date:               Date;
    end_date_details:       DateDetails;
    utc_start_date:         Date;
    utc_start_date_details: DateDetails;
    utc_end_date:           Date;
    utc_end_date_details:   DateDetails;
    timezone:               Timezone;
    timezone_abbr:          TimezoneAbbr;
    cost:                   Cost;
    cost_details:           CostDetails;
    website:                string;
    show_map:               boolean;
    show_map_link:          boolean;
    hide_from_listings:     boolean;
    sticky:                 boolean;
    featured:               boolean;
    categories:             Category[];
    tags:                   Category[];
    venue:                  any[] | VenueClass;
    organizer:              Organizer[];
}

export interface Category {
    name:             string;
    slug:             string;
    term_group:       number;
    term_taxonomy_id: number;
    taxonomy:         Taxonomy;
    description:      string;
    parent:           number;
    count:            number;
    filter:           Filter;
    id:               number;
    urls:             Urls;
}

export enum Filter {
    Raw = "raw",
}

export enum Taxonomy {
    PostTag = "post_tag",
    TribeEventsCat = "tribe_events_cat",
}

export interface Urls {
    self:       string;
    collection: string;
}

export enum Cost {
    Empty = "",
    The16 = "$16",
}

export interface CostDetails {
    currency_symbol:   string;
    currency_code:     string;
    currency_position: CurrencyPosition;
    values:            string[];
}

export enum CurrencyPosition {
    Empty = "",
    Prefix = "prefix",
}

export interface DateDetails {
    year:    string;
    month:   string;
    day:     string;
    hour:    string;
    minutes: string;
    seconds: string;
}

export interface Organizer {
    id:                number;
    status:            Status;
    date:              Date;
    date_utc:          Date;
    modified:          Date;
    modified_utc:      Date;
    url:               string;
    organizer:         string;
    slug:              string;
    phone:             string;
    website:           string;
    email:             string;
    global_id:         string;
    global_id_lineage: string[];
}

export enum Status {
    Publish = "publish",
}

export enum Timezone {
    AmericaChicago = "America/Chicago",
}

export enum TimezoneAbbr {
    Cdt = "CDT",
}

export interface VenueClass {
    id:                number;
    status:            Status;
    date:              Date;
    date_utc:          Date;
    modified:          Date;
    modified_utc:      Date;
    url:               string;
    venue:             string;
    slug:              string;
    geo_lat:           number;
    geo_lng:           number;
    show_map:          boolean;
    show_map_link:     boolean;
    global_id:         string;
    global_id_lineage: string[];
}

@drewvolz drewvolz requested review from hawkrives and rye August 18, 2022 05:49
@drewvolz drewvolz marked this pull request as ready for review August 18, 2022 05:49
hawkrives
hawkrives previously approved these changes Aug 18, 2022
Comment thread modules/node_modules/@frogpond/ccci-stolaf-college/v1/index.js Outdated
@hawkrives

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants