timeularex v0.1.1 Timeularex

NOTE: Timeularex is in early stages of development. Use in production should be considered with caution.

Timeularex is an API client for the Timeular public API

Timular is a service to improve time-tracking of activities.

Configuration

The client provides two options for configuration. The first involves the typical setting of variables in your config.exs file:

config :timeularex,
  api_key: <<API_KEY>>,
  api_secret: <<API_SECRET>>,
  api_url: "https://api.timeular.com/api/v2"

Additionally, you can utilize api_key/1 and api_secret/1 functions in the TImeularex.Config module.

Your API key and secret can be retrieved from your account app settings

Link to this section Summary

Functions

Sets the status of a device to active

List all activities associated with the connected account

Archive an Activity. Time tracked with the Activity will be preserved

List all archived Activities

Assign an Activity to a given device side

Create a new Activity. The activity should have a name and color. A Name doesn’t have to be unique. Optionally, you can also provide an Integration to which the activity will belong to. You can obtain list of enabled Integrations with integrations/0

Sets the status of a device to inactive

List all devices

Edit the notes associated an Activity being tracked

List all the integrations associated with the connected account

Remove a device from the list of known devices. Use activate_device/1 to make the device active again

Called when an application is started

Start tracking a given Activity

Stop tracking a given Activity

Return all time entries that falls between a given time range

Return a time entry by ID

Returns information regarding what is currently being tracked

Unassigns an Activity associated with a given device side

Update an existing Activity’s name and/or color

Update the name of a device

Link to this section Functions

Link to this function activate_device(device_serial)

Sets the status of a device to active.

List all activities associated with the connected account.

Link to this function archive_activity(activity_id)

Archive an Activity. Time tracked with the Activity will be preserved.

Link to this function archived_activities()

List all archived Activities.

Link to this function assign_side_activity(device_side, activity_id)

Assign an Activity to a given device side.

Link to this function create_activity(activity)

Create a new Activity. The activity should have a name and color. A Name doesn’t have to be unique. Optionally, you can also provide an Integration to which the activity will belong to. You can obtain list of enabled Integrations with integrations/0.

Link to this function deactivate_device(device_serial)

Sets the status of a device to inactive.

List all devices.

Link to this function disable_device(device_serial)

Disable a device.

Link to this function edit_tracking_note(activity_id, note)

Edit the notes associated an Activity being tracked.

Link to this function enable_device(device_serial)

Enable a device.

List all the integrations associated with the connected account.

Link to this function remove_device(device_serial)

Remove a device from the list of known devices. Use activate_device/1 to make the device active again.

Link to this function reports(start_timestamp, stop_timestamp)
Link to this function start(type, args)

Called when an application is started.

This function is called when an application is started using Application.start/2 (and functions on top of that, such as Application.ensure_started/2). This function should start the top-level process of the application (which should be the top supervisor of the application’s supervision tree if the application follows the OTP design principles around supervision).

start_type defines how the application is started:

  • :normal - used if the startup is a normal startup or if the application is distributed and is started on the current node because of a failover from another node and the application specification key :start_phases is :undefined.
  • {:takeover, node} - used if the application is distributed and is started on the current node because of a failover on the node node.
  • {:failover, node} - used if the application is distributed and is started on the current node because of a failover on node node, and the application specification key :start_phases is not :undefined.

start_args are the arguments passed to the application in the :mod specification key (e.g., mod: {MyApp, [:my_args]}).

This function should either return {:ok, pid} or {:ok, pid, state} if startup is successful. pid should be the PID of the top supervisor. state can be an arbitrary term, and if omitted will default to []; if the application is later stopped, state is passed to the stop/1 callback (see the documentation for the c:stop/1 callback for more information).

use Application provides no default implementation for the start/2 callback.

Callback implementation for Application.start/2.

Link to this function start_tracking(activity_id)

Start tracking a given Activity.

Link to this function stop_tracking(activity_id)

Stop tracking a given Activity.

Link to this function tags_and_mentions()
Link to this function time_entries(stopped_after, started_before)

Return all time entries that falls between a given time range.

Link to this function time_entry(entry_id)

Return a time entry by ID.

Returns information regarding what is currently being tracked.

Link to this function unassign_side_activity(device_side, activity_id)

Unassigns an Activity associated with a given device side.

Link to this function update_activity(activity)

Update an existing Activity’s name and/or color.

Link to this function update_device_name(device_serial, name)

Update the name of a device.