Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sitelease/sugar-cube-client
A sweet Gitea API client for PHP
https://github.com/sitelease/sugar-cube-client
Last synced: about 2 months ago
JSON representation
A sweet Gitea API client for PHP
- Host: GitHub
- URL: https://github.com/sitelease/sugar-cube-client
- Owner: sitelease
- License: other
- Created: 2020-03-03T22:16:26.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-19T04:28:54.000Z (over 1 year ago)
- Last Synced: 2024-07-31T07:15:50.133Z (5 months ago)
- Language: PHP
- Size: 179 KB
- Stars: 9
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-gitea - Sugar Cube Client - A sweet Gitea API client for PHP (SDK / For internal use)
- awesome-gitea - Sugar Cube Client - A sweet Gitea API client for PHP (SDK / For internal use)
- awesome-gitea - Sugar Cube Client - A sweet Gitea API client for PHP (SDK / For internal use)
README
The Sugar Cube Client, a Gitea API client for PHP
========The Sugar Cube Client allows you to send and recieve data from Gitea's RESTful API using object-oriented PHP.
### How does it work?
Under the hood, Sugar Cube uses the [Guzzle Library](http://docs.guzzlephp.org/en/stable/) to make and send requests to [Gitea's RESTful API](https://try.gitea.io/api/swagger) routes. It then converts the returned JSON response data into PHP objects which you can use to easily query the data.### Real world Example
To see how Sugar Cube can be used in a real world application please refer to [Acapella's code base](https://github.com/sitelease/acappella) (e.g. [line 39](https://github.com/sitelease/acappella/blob/1.0.0/src/Application/GiteaRepositoryManager.php#L39) of GiteaRepositoryManager.php).### What's next?
- [ ] Add Example code to the README
- [ ] Create PHPUnit tests for each API requester
- [ ] Create more API requesters for Gitea's API routes
- [ ] Submit the Sugar Cube composer package to Packagist### Credits
* First thank you goes out to the folks over on the [Gitea.php](https://github.com/sab-international/gitea.php) project. Your Model and Push Event objects provided the foundation of this project.
* Next thank you goes to those who worked on [CompoLab](https://github.com/bricev/CompoLab). It was during the process of porting your great project to Gitea that we made this client.
* And last but not least, a big shout out to everyone who has contributed to [Gitea](https://github.com/go-gitea/gitea). Without your project there wouldn't be any API to make the client for ;)