View Source Influitive.Challenges (influitive v0.1.2)

Documentation for Influitive.Challenges.

Summary

Functions

Archive a challenge identified by the challenge ID

Get Challenges To Approve

This call allows an API user to create a new challenge from a template within the challenge template library.

To return details on a given challenge identified by the challenge UUID

To return details on a given challenge identified by the challenge UUID

Publish a challenge identified by the challenge ID. Optionally schedule the challenge to start and end with the start_at and end_at parameters.

Unpublish a challenge identified by the challenge ID

Types

@type success_or_error() :: {:ok, map()} | {:error, any()}

Functions

Link to this function

approvals(challenge_id, decision, feedback \\ "")

View Source
@spec approvals(integer(), String.t(), String.t()) :: success_or_error()

Approve/Reject Challenges

decision can be approve, reject, or feedback_only

@spec archive(integer()) :: success_or_error()

Archive a challenge identified by the challenge ID

@spec awaiting_approval() :: success_or_error()

Get Challenges To Approve

Link to this function

create_by_template(params)

View Source
@spec create_by_template(map()) :: success_or_error()

This call allows an API user to create a new challenge from a template within the challenge template library.

Note: To target the challenge to 'Everyone' in your AdvocateHub omit both the 'advocates' and 'group_uuids' arrays entirely from the body of your API call.

Note: Only use one of the 'advocates' and 'group_uuids' arrays in your API call if not targeting the challenge to 'Everyone' in your AdvocateHub

@spec get(String.t()) :: success_or_error()

To return details on a given challenge identified by the challenge UUID

Link to this function

get_additional_details(uuid)

View Source
@spec get_additional_details(String.t()) :: success_or_error()

To return details on a given challenge identified by the challenge UUID

@spec publish(integer(), map()) :: success_or_error()

Publish a challenge identified by the challenge ID. Optionally schedule the challenge to start and end with the start_at and end_at parameters.

Params: start_at: Challenge publish start (date time) - ISO8601 Format

end_at: Challenge publish end (date time) - ISO8601 Format

participant_limit: Number of advocates that can start this challenge

@spec unpublish(integer()) :: success_or_error()

Unpublish a challenge identified by the challenge ID