ex_victor_ops v0.2.0 ExVictorOps.OnCall

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

Examples

ExVictorOps.OnCall.get_team "support"
%ExVictorOps.Entity.OnCall({...})

ExVictorOps.OnCall.get_user "davejlong"
[%ExVictorOps.Entity.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 \\ [])

Specs

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

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 \\ [])

Specs

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.