code_corps v0.0.1 CodeCorps.Accounts View Source

Main entry-point for managing accounts.

All actions to accounts should go through here.

Link to this section Summary

Functions

Creates a user record using attributes from a GitHub payload

Creates a user record using attributes from a GitHub payload

Updates a user record using attributes from a GitHub payload along with the access token

Link to this section Functions

Link to this function create_from_github(attrs) View Source
create_from_github(map()) ::
  {:ok, CodeCorps.User.t()} |
  {:error, Ecto.Changeset.t()}

Creates a user record using attributes from a GitHub payload.

Link to this function create_from_github_user(github_user) View Source
create_from_github_user(CodeCorps.GithubUser.t()) ::
  {:ok, CodeCorps.User.t()} |
  {:error, Ecto.Changeset.t()}

Creates a user record using attributes from a GitHub payload.

Link to this function update_from_github_oauth(user, params, access_token) View Source
update_from_github_oauth(CodeCorps.User.t(), map(), String.t()) ::
  {:ok, CodeCorps.User.t()} |
  {:error, Ecto.Changeset.t()}

Updates a user record using attributes from a GitHub payload along with the access token.

Link to this function update_with_github_user(user, github_user) View Source
update_with_github_user(CodeCorps.User.t(), CodeCorps.GithubUser.t()) ::
  {:ok, CodeCorps.User.t()} |
  {:error, Ecto.Changeset.t()}