Class Filter

Hierarchy

  • Filter

Constructors

  • Initialize a new Filter

    Example

    const filter = new Filter({
    subject: Subjects.BIOLOGY,
    status: Status.OPEN,
    term: 202320,
    })

    Parameters

    • Optional filters: Partial<Filter>

    Returns Filter

Properties

attribute: Attributes = Attributes.ALL
levels: Levels = Levels.ALL
secondaryAttribute: Attributes = Attributes.ALL
status: Status = Status.ALL
subject: Subjects = Subjects.ALL
term?: number
termPart: TermParts = TermParts.ALL

Methods

  • Returns {
        attribute: {
            id: string;
            value: Attributes;
        };
        levels: {
            id: string;
            value: Levels;
        };
        secondaryAttribute: {
            id: string;
            value: Attributes;
        };
        status: {
            id: string;
            value: Status;
        };
        subject: {
            id: string;
            value: Subjects;
        };
        term: {
            id: string;
            value: string;
        };
        termPart: {
            id: string;
            value: TermParts;
        };
    }

    • attribute: {
          id: string;
          value: Attributes;
      }
    • levels: {
          id: string;
          value: Levels;
      }
    • secondaryAttribute: {
          id: string;
          value: Attributes;
      }
    • status: {
          id: string;
          value: Status;
      }
    • subject: {
          id: string;
          value: Subjects;
      }
    • term: {
          id: string;
          value: string;
      }
      • id: string
      • value: string
    • termPart: {
          id: string;
          value: TermParts;
      }
  • Returns a URL object with the filter parameters

    Example

    const filter = new Filter({
    subject: Subjects.BIOLOGY,
    status: Status.OPEN,
    term: 202320,
    })

    console.log(filter.url().href)
    // https://courselist.wm.edu/courselist/courseinfo/searchresults?term_code=202320&term_subj=BIOL&attr=0&attr2=0&levl=0&status=OPEN&ptrm=0&search=Search

    Returns URL

Generated using TypeDoc