Pivo v0.1.0 Pivo.Endpoint behaviour View Source

Endpoint behaviour module.

Sets the endpoint configuration.

This module is meant to be use'd in custom modules in order to support different endpoints of the Pivotal's Tracker API.

Receives a params keyword list with the following keys:

  • Required

    • path - String
    • http_methods - list of triplets {action_verb, context, params}
  • Optional

    • path_params - keyword list

Example

defmodule Pivo.MeEndpoint do
  use Pivo.Endpoint,
    path: "/me",
    http_methods: [
        {:get, [resource: Me], []}
      ]
end

Link to this section Summary

Functions

Builds the url_path for a given Pivo.Endpoint using the provided parameters.

Callbacks

Returns the current endpoint path.

Returns the current endpoint path_params.

Link to this section Types

Link to this section Functions

Link to this function

build_path_with_params(endpoint, path_params)

View Source

Builds the url_path for a given Pivo.Endpoint using the provided parameters.

Link to this section Callbacks

Returns the current endpoint path.

Link to this callback

path_params()

View Source
path_params() :: params()

Returns the current endpoint path_params.