# Interface CourseApi

#### See

Course REST API provides the following functions for use by plugins.

interface CourseApi {
activateRoute(dest: RouteDestination | null): Promise<void>;
clearDestination(): Promise<void>;
getCourse(): Promise<CourseInfo>;
setDestination(
dest:
| (PointDestination & { arrivalCircle?: number | undefined; })
| null,
): Promise<void>;
}

#### Hierarchy

- CourseApi
  - ServerAPI

- Defined in course.ts:7

##### Index

### Course API

activateRoute
clearDestination
getCourse
setDestination

## Course API

### activateRoute

- activateRoute(dest: RouteDestination | null): Promise<void>

  Follow a route in the specified direction and starting at the specified point.

  #### Parameters

  - dest: RouteDestination | null

    Object containing route information.

    - returns: Resolved Promise on success.

  #### Returns Promise<void>

  - Defined in course.ts:43

### clearDestination

- clearDestination(): Promise<void>

  Cancels navigation to the current point or route being followed.

  #### Returns Promise<void>

  - Defined in course.ts:20

### getCourse

- getCourse(): Promise<CourseInfo>

  Retrieves the current course information.

  #### Returns Promise<CourseInfo>

  - Defined in course.ts:13

### setDestination

- setDestination(
  dest:
  | (PointDestination & { arrivalCircle?: number | undefined; })
  | null,
  ): Promise<void>

  Set course to a specified position / waypoint.

  #### Parameters

  - dest: (PointDestination & { arrivalCircle?: number | undefined; }) | null

    Object containing destination position information.

  #### Returns Promise<void>

  - Defined in course.ts:30