code_corps v0.0.1 CodeCorps.GitHub.Adapters.User View Source

Used to adapt a GitHub issue payload into attributes for creating or updating a CodeCorps.Task.

Link to this section Summary

Functions

Converts a GitHub User payload into a set of attributes used to create or update a GithubUser record

Converts a Github user payload into a map of attributes suitable for creating or updating a CodeCorps.User

Converts a GithubUser into a set of attributes used to create or update a GitHub User on the GitHub API

Link to this section Functions

Link to this function to_github_user(payload) View Source
to_github_user(map()) :: map()

Converts a GitHub User payload into a set of attributes used to create or update a GithubUser record.

Link to this function to_user(payload) View Source
to_user(map()) :: map()

Converts a Github user payload into a map of attributes suitable for creating or updating a CodeCorps.User

The type gets transformed to match our expected values for user type.

Link to this function to_user_attrs(github_user) View Source
to_user_attrs(CodeCorps.GithubUser.t()) :: map()

Converts a GithubUser into a set of attributes used to create or update a GitHub User on the GitHub API.