ex_victor_ops v0.4.1 ExVictorOps.OnCall

Interacts with the On-Call endpoints of the VictorOps API.

Examples

ExVictorOps.OnCall.get_team "support"
{:ok, %ExVictorOps.Entities.OnCall{}}

ExVictorOps.OnCall.get_user "davejlong"
{:ok, [%ExVictorOps.Entities.OnCall{}]}

Summary

Functions

Returns a team’s on-call schedule from the VictorOps API

Returns a user’s on-call schedule across all teams from the VictorOps API

Functions

get_team(team, options \\ [])
get_team(String.t, [{:atom, String.t}]) :: {:atom, any}

Returns a team’s on-call schedule from the VictorOps API.

Args:

  • team - Team slug to get from VictorOps
  • options - orddict of options to pass in the request

Options:

  • days_forward - Days to include in returned schedule (30 max)
  • days_skip - Days to skip before computing schedule to return (90 max)
  • step - Step of escalation policy (3 max)

Returns ExVictorOps.Entities.OnCall if successful.

get_user(user, options \\ [])
get_user(String.t, [{atom, String.t}]) :: %ExVictorOps.Entities.OnCall{overrides: term, schedule: term, team: term}

Returns a user’s on-call schedule across all teams from the VictorOps API.

Args:

  • user - User to get from VictorOps
  • options - orddict of options to pass in the request

Options:

  • days_forward - Days to include in returned schedule (30 max)
  • days_skip - Days to skip before computing schedule to return (90 max)
  • step - Step of escalation policy (3 max)

Returns ExVictorOps.Entities.OnCall if successful.