Skip to content
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.

Commit

Permalink
Update ESGitHubClient
Browse files Browse the repository at this point in the history
  • Loading branch information
joshbruce committed Jul 16, 2020
1 parent 7b7ee67 commit a32d190
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
10 changes: 9 additions & 1 deletion src/ESPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
ESBool
};

use Eightfold\ShoopExtras\Shoop;
use Eightfold\ShoopExtras\{
Shoop,
ESStore
};

class ESPath implements Shooped
{
Expand Down Expand Up @@ -45,6 +48,11 @@ public function array(): ESArray
return $this->parts();
}

public function store(): ESStore
{
return Shoop::store($this->value());
}

public function plus(...$parts)
{
$path = $this->parts()->plus(...$parts)->join("/")->start("/");
Expand Down
18 changes: 16 additions & 2 deletions src/Shoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,22 @@ static public function uri($uri)
return ESUri::fold($uri);
}

static public function github(string $path, string $personalToken, string $username, string $repo)
static public function github(
string $path,
string $personalToken,
string $username,
string $repo,
string $cacheRootPath = "",
string $cacheFolderName = "cache"
)
{
return ESGitHubClient::fold($path, $personalToken, $username, $repo);
return ESGitHubClient::fold(
$path,
$personalToken,
$username,
$repo,
$cacheRootPath,
$cacheFolderName
);
}
}

0 comments on commit a32d190

Please sign in to comment.