# Generated by `mix github.gen` from docs/github-api/api.github.com.json.
# Do not edit by hand; re-run the task instead.
defmodule Noizu.Github.Api.CodesOfConduct do
@moduledoc """
GitHub `codes-of-conduct` API.
"""
import Noizu.Github
@doc """
Get all codes of conduct
@see https://docs.github.com/rest/codes-of-conduct/codes-of-conduct#get-all-codes-of-conduct
"""
def get_all_codes_of_conduct(options \\ nil) do
url = github_base() <> "/codes_of_conduct"
body = %{}
api_call(:get, url, body, Noizu.Github.Collection.CodeOfConduct, options)
end
@doc """
Get a code of conduct
@see https://docs.github.com/rest/codes-of-conduct/codes-of-conduct#get-a-code-of-conduct
"""
def get_conduct_code(key, options \\ nil) do
url = github_base() <> "/codes_of_conduct/#{key}"
body = %{}
api_call(:get, url, body, Noizu.Github.CodeOfConduct, options)
end
end