# API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### Table of Contents

-   [KerbalAlarmClock](#kerbalalarmclock)
-   [alarmWithName](#alarmwithname)
-   [alarmsWithType](#alarmswithtype)
-   [createAlarm](#createalarm)
-   [getAvailable](#getavailable)
-   [getAlarms](#getalarms)
-   [alarmRemove](#alarmremove)
-   [alarmGetAction](#alarmgetaction)
-   [alarmSetAction](#alarmsetaction)
-   [alarmGetMargin](#alarmgetmargin)
-   [alarmSetMargin](#alarmsetmargin)
-   [alarmGetTime](#alarmgettime)
-   [alarmSetTime](#alarmsettime)
-   [alarmGetType](#alarmgettype)
-   [alarmGetId](#alarmgetid)
-   [alarmGetName](#alarmgetname)
-   [alarmSetName](#alarmsetname)
-   [alarmGetNotes](#alarmgetnotes)
-   [alarmSetNotes](#alarmsetnotes)
-   [alarmGetRemaining](#alarmgetremaining)
-   [alarmGetRepeat](#alarmgetrepeat)
-   [alarmSetRepeat](#alarmsetrepeat)
-   [alarmGetRepeatPeriod](#alarmgetrepeatperiod)
-   [alarmSetRepeatPeriod](#alarmsetrepeatperiod)
-   [alarmGetVessel](#alarmgetvessel)
-   [alarmSetVessel](#alarmsetvessel)
-   [alarmGetXferOriginBody](#alarmgetxferoriginbody)
-   [alarmSetXferOriginBody](#alarmsetxferoriginbody)
-   [alarmGetXferTargetBody](#alarmgetxfertargetbody)
-   [alarmSetXferTargetBody](#alarmsetxfertargetbody)

## KerbalAlarmClock

This service provides functionality to interact with
<a href="https://forum.kerbalspaceprogram.com/index.php?/topic/22809-13x-kerbal-alarm-clock-v3850-may-30/">Kerbal Alarm Clock</a>.

Returns **void** 

## alarmWithName

**Extends KerbalAlarmClock**

Get the alarm with the given {name}, or null
if no alarms have that name. If more than one alarm has the name,
only returns one of them.

**Parameters**

-   `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Name of the alarm to search for.

Returns **{call: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), decode: [function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)}** 

## alarmsWithType

**Extends KerbalAlarmClock**

Get a list of alarms of the specified {type}.

**Parameters**

-   `type` **Long** A long value representing the id for the KerbalAlarmClock.AlarmType

Returns **{call: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), decode: [function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)}** 

## createAlarm

**Extends KerbalAlarmClock**

Create a new alarm and return it.

**Parameters**

-   `type` **Long** A long value representing the id for the KerbalAlarmClock.AlarmType
-   `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Name of the new alarm.
-   `ut` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Time at which the new alarm should trigger.

Returns **{call: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), decode: [function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)}** 

## getAvailable

**Extends KerbalAlarmClock**

Whether Kerbal Alarm Clock is available.

Returns **{call: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), decode: [function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)}** 

## getAlarms

**Extends KerbalAlarmClock**

A list of all the alarms.

Returns **{call: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), decode: [function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)}** 

## alarmRemove

**Extends KerbalAlarmClock**

Removes the alarm.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm

Returns **void** 

## alarmGetAction

**Extends KerbalAlarmClock**

The action that the alarm triggers.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm

Returns **{call: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), decode: [function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)}** 

## alarmSetAction

**Extends KerbalAlarmClock**

The action that the alarm triggers.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm
-   `value` **Long** A long value representing the id for the KerbalAlarmClock.AlarmAction

Returns **void** 

## alarmGetMargin

**Extends KerbalAlarmClock**

The number of seconds before the event that the alarm will fire.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm

Returns **{call: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), decode: [function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)}** 

## alarmSetMargin

**Extends KerbalAlarmClock**

The number of seconds before the event that the alarm will fire.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm
-   `value` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** 

Returns **void** 

## alarmGetTime

**Extends KerbalAlarmClock**

The time at which the alarm will fire.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm

Returns **{call: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), decode: [function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)}** 

## alarmSetTime

**Extends KerbalAlarmClock**

The time at which the alarm will fire.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm
-   `value` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** 

Returns **void** 

## alarmGetType

**Extends KerbalAlarmClock**

The type of the alarm.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm

Returns **{call: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), decode: [function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)}** 

## alarmGetId

**Extends KerbalAlarmClock**

The unique identifier for the alarm.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm

Returns **{call: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), decode: [function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)}** 

## alarmGetName

**Extends KerbalAlarmClock**

The short name of the alarm.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm

Returns **{call: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), decode: [function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)}** 

## alarmSetName

**Extends KerbalAlarmClock**

The short name of the alarm.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm
-   `value` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 

Returns **void** 

## alarmGetNotes

**Extends KerbalAlarmClock**

The long description of the alarm.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm

Returns **{call: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), decode: [function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)}** 

## alarmSetNotes

**Extends KerbalAlarmClock**

The long description of the alarm.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm
-   `value` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 

Returns **void** 

## alarmGetRemaining

**Extends KerbalAlarmClock**

The number of seconds until the alarm will fire.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm

Returns **{call: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), decode: [function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)}** 

## alarmGetRepeat

**Extends KerbalAlarmClock**

Whether the alarm will be repeated after it has fired.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm

Returns **{call: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), decode: [function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)}** 

## alarmSetRepeat

**Extends KerbalAlarmClock**

Whether the alarm will be repeated after it has fired.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm
-   `value` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 

Returns **void** 

## alarmGetRepeatPeriod

**Extends KerbalAlarmClock**

The time delay to automatically create an alarm after it has fired.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm

Returns **{call: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), decode: [function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)}** 

## alarmSetRepeatPeriod

**Extends KerbalAlarmClock**

The time delay to automatically create an alarm after it has fired.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm
-   `value` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** 

Returns **void** 

## alarmGetVessel

**Extends KerbalAlarmClock**

The vessel that the alarm is attached to.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm

Returns **{call: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), decode: [function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)}** 

## alarmSetVessel

**Extends KerbalAlarmClock**

The vessel that the alarm is attached to.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm
-   `value` **Long** A long value representing the id for the SpaceCenter.Vessel

Returns **void** 

## alarmGetXferOriginBody

**Extends KerbalAlarmClock**

The celestial body the vessel is departing from.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm

Returns **{call: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), decode: [function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)}** 

## alarmSetXferOriginBody

**Extends KerbalAlarmClock**

The celestial body the vessel is departing from.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm
-   `value` **Long** A long value representing the id for the SpaceCenter.CelestialBody

Returns **void** 

## alarmGetXferTargetBody

**Extends KerbalAlarmClock**

The celestial body the vessel is arriving at.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm

Returns **{call: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), decode: [function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)}** 

## alarmSetXferTargetBody

**Extends KerbalAlarmClock**

The celestial body the vessel is arriving at.

**Parameters**

-   `alarm` **Long** A long value representing the id for the KerbalAlarmClock.Alarm
-   `value` **Long** A long value representing the id for the SpaceCenter.CelestialBody

Returns **void** 
