View Source Squeeze.Races (OpenPace v0.0.1)

The Races context.

Link to this section Summary

Link to this section Functions

Returns an %Ecto.Changeset{} for tracking race changes.

examples

Examples

iex> change_race(race) %Ecto.Changeset{source: %Race{}}

Link to this function

change_race_goal(race_goal)

View Source

Returns an %Ecto.Changeset{} for tracking race changes.

examples

Examples

iex> change_race(race) %Ecto.Changeset{source: %Race{}}

Link to this function

create_default_paces(race_goal)

View Source
Link to this function

create_race(attrs \\ %{})

View Source
Link to this function

create_race_goal(user, attrs \\ %{})

View Source
Link to this function

create_race_goal_from_activity(activity)

View Source
Link to this function

create_training_pace(race_goal, attrs)

View Source
Link to this function

delete_race_goal(race_goal)

View Source

Deletes an RaceGoal.

examples

Examples

iex> delete_race_goal(race_goal) {:ok, %RaceGoal{}}

iex> delete_race_goal(race_goal) {:error, %Ecto.Changeset{}}

Link to this function

find_or_create_race_goal_from_activity(activity)

View Source

Gets a single race.

Raises Ecto.NoResultsError if the Race does not exist.

examples

Examples

iex> get_race!("boston-marathon")
%Race{}

iex> get_race!("fake-marathon")
** (Ecto.NoResultsError)
Link to this function

list_previous_race_goals(user)

View Source
Link to this function

list_race_activities(user)

View Source
Link to this function

list_race_goals(user, map)

View Source
Link to this function

list_upcoming_race_goals(user)

View Source
Link to this function

nearest_race_goal(user, date \\ nil)

View Source
Link to this function

update_race_goal(race_goal, attrs)

View Source