From 0a975d6e59c60f5d470cdbaae604367b6d79b5f6 Mon Sep 17 00:00:00 2001 From: nelsonic Date: Sun, 16 Jun 2024 12:36:24 +0400 Subject: [PATCH] enhance docs - no code changed --- README.md | 7 +++++-- lib/elixir_auth_github.ex | 4 +++- lib/httpoison_mock.ex | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bedaa4d..feed5e7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
-# `elixir-auth-github` +# `elixir-auth-github` 💧 🔒 :octocat: The _easiest_ way to add GitHub OAuth authentication to your Elixir/Phoenix Apps. @@ -8,9 +8,12 @@ to your Elixir/Phoenix Apps. [![Build Status](https://img.shields.io/travis/com/dwyl/elixir-auth-github/master?color=bright-green&style=flat-square)](https://travis-ci.org/dwyl/elixir-auth-github) [![codecov.io](https://img.shields.io/codecov/c/github/dwyl/elixir-auth-github/master.svg?style=flat-square)](http://codecov.io/github/dwyl/elixir-auth-github?branch=master) [![Hex.pm](https://img.shields.io/hexpm/v/elixir_auth_github?color=brightgreen&style=flat-square)](https://hex.pm/packages/elixir_auth_github) +[![docs](https://img.shields.io/badge/docs-maintained-brightgreen?style=flat-square)](https://hexdocs.pm/elixir_auth_github/ElixirAuthGithub.html) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat-square)](https://github.com/dwyl/elixir-auth-github/issues) -[![Libraries.io dependency status](https://img.shields.io/librariesio/release/hex/elixir_auth_github?style=flat-square)](https://libraries.io/hex/elixir_auth_github) [![HitCount](http://hits.dwyl.com/dwyl/elixir-auth-github.svg)](http://hits.dwyl.com/dwyl/elixir-auth-github) +
diff --git a/lib/elixir_auth_github.ex b/lib/elixir_auth_github.ex index 12616cb..beee44e 100644 --- a/lib/elixir_auth_github.ex +++ b/lib/elixir_auth_github.ex @@ -21,6 +21,7 @@ defmodule ElixirAuthGithub do @doc """ `client_id/0` returns a `String` of the `GITHUB_CLIENT_ID` + e.g: `"d6fca75c63daa014c187"` """ def client_id do System.get_env("GITHUB_CLIENT_ID") || Application.get_env(:elixir_auth_github, :client_id) @@ -28,6 +29,7 @@ defmodule ElixirAuthGithub do @doc """ `client_secret/0` returns a `String` of the `GITHUB_CLIENT_SECRET` + e.g: `"8eeb143935d1a505692aaef856db9b"` """ def client_secret do System.get_env("GITHUB_CLIENT_SECRET") || Application.get_env(:elixir_auth_github, :client_secret) @@ -64,7 +66,7 @@ defmodule ElixirAuthGithub do @doc """ When called with a valid OAuth callback code, `github_auth/1` makes a number of authentication requests to GitHub and returns a tuple with `:ok` and a map with - GitHub user details and an access_token. + GitHub user details and an `access_token`. Bad authentication codes will return a tuple with `:error` and an error map. """ diff --git a/lib/httpoison_mock.ex b/lib/httpoison_mock.ex index c3523fd..0a3d998 100644 --- a/lib/httpoison_mock.ex +++ b/lib/httpoison_mock.ex @@ -1,10 +1,10 @@ defmodule ElixirAuthGithub.HTTPoisonMock do @moduledoc """ - This is a set up to mock (stub) our API requests to the GitHub API + This is a set up to **mock** (stub) our API requests to the GitHub API so that we can test all of our code in ElixirAuthGithub. These are just functions that pattern match on the entries and return things in the way we expect, - so that we can check the pipeline in ElixirAuthGithub.github_auth + so that we can check the pipeline in `ElixirAuthGithub.github_auth/1` """ @doc """