View Source Squeeze.Notifications (OpenPace v0.0.1)

The Notifications context.

Link to this section Summary

Link to this section Functions

Link to this function

batch_notify_challenge_ended(datetime \\ Timex.now())

View Source
Link to this function

batch_notify_challenge_ending(datetime \\ Timex.now())

View Source
Link to this function

batch_notify_challenge_start(datetime \\ Timex.now())

View Source
Link to this function

change_push_token(push_token)

View Source

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

examples

Examples

iex> change_push_token(push_token)
%Ecto.Changeset{source: %PushToken{}}
Link to this function

create_push_token(user, token)

View Source

Creates a push_token.

examples

Examples

iex> create_push_token(user, token)
{:ok, %PushToken{}}

iex> create_push_token(user, nil)
{:error, %Ecto.Changeset{}}
Link to this function

delete_push_token(push_token)

View Source

Deletes a push_token.

examples

Examples

iex> delete_push_token(push_token)
{:ok, %PushToken{}}

iex> delete_push_token(push_token)
{:error, %Ecto.Changeset{}}
Link to this function

list_challenges_ending_soon(datetime \\ Timex.now())

View Source
Link to this function

list_challenges_recently_ended(datetime \\ Timex.now())

View Source
Link to this function

list_challenges_starting_soon(datetime \\ Timex.now())

View Source
Link to this function

notify_challenge_ended(challenge, datetime \\ Timex.now())

View Source
Link to this function

notify_challenge_ending(challenge, datetime \\ Timex.now())

View Source
Link to this function

notify_challenge_started(challenge, datetime \\ Timex.now())

View Source
Link to this function

notify_leader_change(challenge)

View Source
Link to this function

notify_new_activity(activity)

View Source
Link to this function

notify_user_joined(challenge, user)

View Source
Link to this function

time_to_send?(date, user, datetime \\ Timex.now())

View Source

Checks to see if it is 9am in the user's timezone on the date