code_corps v0.0.1 CodeCorps.GitHub.Sync.User.RecordLinker View Source

In charge of finding a user to link with a given record given a GitHub API payload containing the user.

The only entry point is link_to/2.

Link to this section Summary

Functions

Finds or creates a user using information in the resource and the GitHub API payload

Link to this section Types

Link to this type result() View Source
result() ::
  {:ok, CodeCorps.User.t()} |
  {:error, Ecto.Changeset.t()} |
  {:error, :multiple_users}

Link to this section Functions

Link to this function find_or_create_disassociated_user(attrs) View Source
find_or_create_disassociated_user(map()) :: {:ok, CodeCorps.User.t()}