View Source Tentacat.Trees (Tentacat v2.5.0)

Summary

Functions

Link to this function

create(owner, repo, body, client)

View Source
@spec create(binary(), binary(), map(), Tentacat.Client.t()) :: Tentacat.response()

Create a Tree.

Tree body example:

%{
  "base_tree" => "9fb037999f264ba9a7fc6274d15fa3ae2ab98312",
  "tree" => [
    %{
      "path" => "elixir.ex",
      "mode" => "100644",
      "type" => "blob",
      "sha"  => "44b4fc6d56897b048c772eb4087f854f46256132"
    }
  ]
}

Example

Tentacat.Trees.create "elixir-lang", "elixir", body, client

More info at: https://developer.github.com/v3/git/trees/#create-a-tree

Link to this function

find(owner, repo, sha, client \\ %Client{})

View Source

Get a Tree.

Example

Tentacat.Trees.find "elixir-lang", "elixir", "eac64175b71fc598fa0b6e611dea6a58973170e9"
Tentacat.Trees.find "elixir-lang", "elixir", "eac64175b71fc598fa0b6e611dea6a58973170e9", client

More info at: https://developer.github.com/v3/git/trees/#get-a-tree

Link to this function

find_recursive(owner, repo, sha, client \\ %Client{})

View Source
@spec find_recursive(binary(), binary(), binary(), Tentacat.Client.t()) ::
  Tentacat.response()

Get a Tree Recursively.

Example

Tentacat.Trees.find_recursive "elixir-lang", "elixir", "eac64175b71fc598fa0b6e611dea6a58973170e9"
Tentacat.Trees.find_recursive "elixir-lang", "elixir", "eac64175b71fc598fa0b6e611dea6a58973170e9", client

More info at: https://developer.github.com/v3/git/trees/#get-a-tree-recursively