Skip to content

Releases: aternosorg/php-hangar-api

v4.0.0

06 Dec 18:06
f78f233
Compare
Choose a tag to compare

Changes:

  • Changes return type for APIKeysApi->getKeys() from \Aternos\HangarApi\Model\ApiKey to \Aternos\HangarApi\Model\ApiKey[]
  • Removes parameter platform_version from VersionsAPI->listVersions()
  • Removes parameter platformVersion from CompactProject->getVersions()
  • Removes parameter platformVersion from Project->getVersions()
  • Removes member platformVersion from VersionSearchOptions
  • Adds property description to ProjectCompact
  • Adds model for Tag
  • Changes type of property tags in ProjectSettings from string[] to \Aternos\HangarApi\Model\Tag[]

v3.3.1

03 Sep 15:26
8fc4f70
Compare
Choose a tag to compare

Fixes

  • Prevent PHP Warning for array to string conversion when fetching project versions

v3.3.0

17 Jul 12:37
0e436db
Compare
Choose a tag to compare

v3.2.0

08 Jan 16:31
21a0e75
Compare
Choose a tag to compare
  • Add sort order to project search

v3.1.1

22 Dec 15:08
ddb0225
Compare
Choose a tag to compare

Fixes

  • Add extends doc comment to ProjectMemberList

This fixes the annotated return type of all methods of the ProjectMemberList class.

v3.1.0

22 Dec 15:01
7bec629
Compare
Choose a tag to compare

New Features

  • Add method ResultList->getResultsFromFollowingPages to get the results from all pages

v3.0.0

21 Dec 18:23
b1e2758
Compare
Choose a tag to compare

Version 3.0.0 continues the transition from namespaces to unique slugs and also fixes the name of a parameter that was changed.

Breaking Changes

  • Methods that previously accepted a ProjectNamespace now only accept the project slug.This includes:
    • getProjectWatchers
    • getProjectStarGazers
    • getProjectMembers
  • The following methods previously accepted a Project or ProjectNamespace and now accept a Project or slug:
    • getProjectVersions
    • getProjectVersion
  • VersionSearchOptions->projectNamespace has also been replaced with the projectSlug
  • The project search option 'order with relevance' was renamed to 'prioritize exact match'. Version 2.0.0 already changed the option passed to the hangar API and this change makes the name in our code base match the behaviour.

New Features

  • Add shorthand getSlug() to Project and CompactProject
  • Add setter for a custom HTTPClient
  • Add constructor parameters for api key and user agent

v2.0.0

06 Sep 12:37
d08554b
Compare
Choose a tag to compare

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 $pagination or pass it as a named argument, you must not change anything
  • Please update your function calls to include the argument $query if do not want to use the default value ("" = all) or if you use the argument $pagination and 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 $pagination or pass it as a named argument, you must not change anything
  • Please update your function calls to include the argument $query if do not want to use the default value ("" = all) or if you use the argument $pagination and 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 $author from 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 $author from 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 $author from 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 $author from 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 $author from 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 $owner from 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 $owner from 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 $owner from your function calls

v1.0.0

19 Apr 12:07
47c1cc2
Compare
Choose a tag to compare
remove version from composer.json