v2.0.0
A few days ago Hangar released some API changes.
This release contains the new generated code and updated our client code.
Basically they removed the author / owner parameter from most api endpoints because the project name / slug is unique (now).
For detailed information see #1
Migration guide
Migration guide from 1.0.0 to 2.0.0
HangarAPIClient->getStaff() method signature changed (added parameter $query and added parameter $sort)
from public function getStaff(?RequestPagination $pagination = null): StaffList
to public function getStaff(string $query = "", ?RequestPagination $pagination = null, ?string $sort = null): StaffList
- If you don't use the argument
$paginationor pass it as a named argument, you must not change anything - Please update your function calls to include the argument
$queryif do not want to use the default value ("" = all) or if you use the argument$paginationand do not pass it as a named argument
HangarAPIClient->getAuthors() method signature changed (added parameter $query and added parameter $sort)
from public function getAuthors(?RequestPagination $pagination = null): AuthorList
to public function getAuthors(string $query = "", ?RequestPagination $pagination = null, ?string $sort = null): AuthorList
- If you don't use the argument
$paginationor pass it as a named argument, you must not change anything - Please update your function calls to include the argument
$queryif do not want to use the default value ("" = all) or if you use the argument$paginationand do not pass it as a named argument
HangarAPIClient->getProject() method signature changed (removed parameter $author)
from public function getProject(string $author, string $name): Project
to public function getProject(string $slug): Project
- Please remove the argument
$authorfrom your function calls
HangarAPIClient->getProjectMainPage() method signature changed (removed parameter $author)
from public function getProjectMainPage(string $author, string $slug): ProjectPage
to public function getProjectMainPage(string $slug): ProjectPage
- Please remove the argument
$authorfrom your function calls
HangarAPIClient->getProjectPage() method signature changed (removed parameter $author)
from public function getProjectPage(string $author, string $slug, string $path): ProjectPage
to public function getProjectPage(string $slug, string $path): ProjectPage
- Please remove the argument
$authorfrom your function calls
HangarAPIClient->editProjectMainPage() method signature changed (removed parameter $author)
from public function editProjectMainPage(string $author, string $slug, string $content): ProjectPage
to public function editProjectMainPage(string $slug, string $content): ProjectPage
- Please remove the argument
$authorfrom your function calls
HangarAPIClient->editProjectPage() method signature changed (removed parameter $author)
from public function editProjectPage(string $author, string $slug, string $path, string $content): ProjectPage
to public function editProjectPage(string $slug, string $path, string $content): ProjectPage
- Please remove the argument
$authorfrom your function calls
HangarAPIClient->hasPermissions() method signature changed (removed parameter $owner)
from public function hasPermissions(array $permissions, ?string $owner = null, ?string $project = null): bool
to public function hasPermissions(array $permissions, ?string $project = null): bool
- Please remove the argument
$ownerfrom your function calls
HangarAPIClient->hasPermission() method signature changed (removed parameter $owner)
from public function hasPermission(string $permission, ?string $owner = null, ?string $project = null): bool
to public function hasPermission(string $permission, ?string $project = null): bool
- Please remove the argument
$ownerfrom your function calls
HangarAPIClient->getDailyProjectStats() method signature changed (removed parameter $owner)
from public function getDailyProjectStats(string $owner, string $slug, DateTime $from, ?DateTime $to = null): array
to public function getDailyProjectStats(string $slug, DateTime $from, ?DateTime $to = null): array
- Please remove the argument
$ownerfrom your function calls