Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add the-events-calendar endpoint #621

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

drewvolz
Copy link
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
@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