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

Posts content to github

Summary

Functions

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

shortcut for get_file/5

Uses Application.get_env/2 for default parameters.

Link to this function

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

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

Gets file content from GitHub

Link to this function

new_file(filename, filecontent)

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

shortcut for new_file/6

Uses Application.get_env/2 for default parameters.

Link to this function

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

View Source
@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

Link to this function

update_file(filename, filecontent)

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

shortcut for update_file/6

Uses Application.get_env/2 for default parameters.

Link to this function

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

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

Updates a file on GitHub