View Source LastCrusader.Micropub.GitHub (Last Crusader v0.11.0)

Posts content to github

Summary

Functions

get_file(filename)

@spec get_file(String.t()) :: {:ko, atom()} | {:ok, any()}

shortcut for get_file/5

Uses Application.get_env/2 for default parameters.

get_file(auth, user, repo, filename, branch \\ "master")

@spec get_file(map(), String.t(), String.t(), String.t(), String.t()) ::
  {:ko, atom()} | {:ok, any()}

Gets file content from GitHub

new_file(filename, filecontent)

@spec new_file(String.t(), String.t()) :: {:ko, atom()} | {:ok, any()}

shortcut for new_file/6

Uses Application.get_env/2 for default parameters.

new_file(auth, user, repo, filename, filecontent, branch \\ "master")

@spec new_file(map(), String.t(), String.t(), String.t(), String.t(), String.t()) ::
  {:ko, atom()} | {:ok, any()}

Creates a commit with the filecontent to GitHub

update_file(filename, filecontent)

@spec update_file(String.t(), String.t()) :: {:ko, atom()} | {:ok, any()}

shortcut for update_file/6

Uses Application.get_env/2 for default parameters.

update_file(auth, user, repo, filename, filecontent, branch \\ "master")

@spec update_file(map(), String.t(), String.t(), String.t(), String.t(), String.t()) ::
  {:ko, atom()} | {:ok, any()}

Updates a file on GitHub