Skip to content

Commit fae42d9

Browse files
Merge pull request #4 from openapi/upkeep
Upkeep
2 parents 7dc86b8 + 2bfceb3 commit fae42d9

5 files changed

Lines changed: 184 additions & 3 deletions

File tree

.github/assets/repo-header-a3.png

11.5 KB
Loading

README.md

Lines changed: 102 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
1-
# OpenAPI PHP SDK
1+
<div align="center">
2+
<a href="https://openapi.com/">
3+
<img alt="Openapi SDK for PHP" src=".github/assets/repo-header-a3.png" >
4+
</a>
25

3-
A minimal and agnostic PHP SDK for OpenAPI, inspired by the Rust implementation. This SDK provides only the core HTTP primitives needed to interact with any OpenAPI service.
6+
<h1>Openapi® client for PHP</h1>
7+
<h4>The perfect starting point to integrate <a href="https://openapi.com/">Openapi®</a> within your PHP project</h4>
8+
9+
[![Build Status](https://img.shields.io/github/actions/workflow/status/openapi/openapi-php-sdk/ci.yml?branch=main)](https://github.com/openapi/openapi-php-sdk/actions)
10+
[![Packagist Version](https://img.shields.io/packagist/v/openapi/openapi-sdk)](https://packagist.org/packages/openapi/openapi-sdk)
11+
[![PHP Version](https://img.shields.io/packagist/php-v/openapi/openapi-sdk)](https://packagist.org/packages/openapi/openapi-sdk)
12+
[![License](https://img.shields.io/github/license/openapi/openapi-php-sdk)](LICENSE)
13+
[![Downloads](https://img.shields.io/packagist/dt/openapi/openapi-sdk)](https://packagist.org/packages/openapi/openapi-sdk)
14+
</div>
15+
16+
## Overview
17+
18+
A minimal and agnostic PHP SDK for Openapi, inspired by a clean client implementation. This SDK provides only the core HTTP primitives needed to interact with any Openapi service.
19+
20+
## Pre-requisites
21+
22+
Before using the Openapi Rust Client, you will need an account at [Openapi](https://console.openapi.com/) and an API key to the sandbox and/or production environment
423

524
## Features
625

@@ -10,6 +29,18 @@ A minimal and agnostic PHP SDK for OpenAPI, inspired by the Rust implementation.
1029
- **HTTP Primitives**: GET, POST, PUT, DELETE, PATCH methods
1130
- **Clean Interface**: Similar to the Rust SDK design
1231

32+
## What you can do
33+
34+
With the Openapi Rust Client, you can easily interact with a variety of services in the Openapi Marketplace. For example, you can:
35+
36+
- 📩 **Send SMS messages** with delivery reports and custom sender IDs
37+
- 💸 **Process bills and payments** in real time via API
38+
- 🧾 **Send electronic invoices** securely to the Italian Revenue Agency
39+
- 📄 **Generate PDFs** from HTML content, including JavaScript rendering
40+
- ✉️ **Manage certified emails** and legal communications via Italian Legalmail
41+
42+
For a complete list of all available services, check out the [Openapi Marketplace](https://console.openapi.com/) 🌐
43+
1344
## Installation
1445

1546
```bash
@@ -69,4 +100,72 @@ This SDK follows a minimal approach with only essential components:
69100

70101
- PHP 8.0 or higher
71102
- cURL extension
72-
- JSON extension
103+
- JSON extension
104+
105+
## Examples
106+
107+
You can find complete examples in the `examples/` directory:
108+
109+
- `examples/token_generation.php` - OAuth token generation example
110+
- `examples/api_calls.php` - HTTP API calls example
111+
- `examples/complete_workflow.php` - End-to-end workflow example
112+
113+
Run examples with:
114+
115+
```bash
116+
composer run example:token
117+
composer run example:api
118+
composer run example:complete
119+
```
120+
121+
## Testing
122+
123+
Run tests with:
124+
125+
```bash
126+
# Run all tests
127+
composer run test
128+
129+
# Run unit tests specifically
130+
composer run test:unit
131+
```
132+
133+
134+
## Contributing
135+
136+
Contributions are always welcome! Whether you want to report bugs, suggest new features, improve documentation, or contribute code, your help is appreciated.
137+
138+
See [docs/contributing.md](docs/contributing.md) for detailed instructions on how to get started. Please make sure to follow this project's [docs/code-of-conduct.md](docs/code-of-conduct.md) to help maintain a welcoming and collaborative environment.
139+
140+
## Authors
141+
142+
Meet the project authors:
143+
144+
- L. Paderi ([@lpaderiAltravia](https://www.github.com/lpaderiAltravia))
145+
- Openapi Team ([@openapi-it](https://github.com/openapi-it))
146+
147+
## Partners
148+
149+
Meet our partners using Openapi or contributing to this SDK:
150+
151+
- [Blank](https://www.blank.app/)
152+
- [Credit Safe](https://www.creditsafe.com/)
153+
- [Deliveroo](https://deliveroo.it/)
154+
- [Gruppo MOL](https://molgroupitaly.it/it/)
155+
- [Jakala](https://www.jakala.com/)
156+
- [Octotelematics](https://www.octotelematics.com/)
157+
- [OTOQI](https://otoqi.com/)
158+
- [PWC](https://www.pwc.com/)
159+
- [QOMODO S.R.L.](https://www.qomodo.me/)
160+
- [SOUNDREEF S.P.A.](https://www.soundreef.com/)
161+
162+
## License
163+
164+
This project is licensed under the [MIT License](LICENSE).
165+
166+
The MIT License is a permissive open-source license that allows you to freely use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the software, provided that the original copyright notice and this permission notice are included in all copies or substantial portions of the software.
167+
168+
In short, you are free to use this SDK in your personal, academic, or commercial projects, with minimal restrictions. The project is provided "as-is", without any warranty of any kind, either expressed or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement.
169+
170+
For more details, see the full license text at the [MIT License page](https://choosealicense.com/licenses/mit/).
171+

composer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,12 @@
2121
"require-dev": {
2222
"symfony/dotenv": "^5.3",
2323
"phpunit/phpunit": "^9.5"
24+
},
25+
"scripts": {
26+
"test": "phpunit tests/",
27+
"test:unit": "phpunit tests/ --testsuite=unit",
28+
"example:token": "php examples/token_generation.php",
29+
"example:api": "php examples/api_calls.php",
30+
"example:complete": "php examples/complete_workflow.php"
2431
}
2532
}

docs/code-of-conduct.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project a harassment-free experience for everyone.
6+
7+
## Our Standards
8+
9+
Examples of positive behavior:
10+
11+
- Using welcoming and inclusive language
12+
- Being respectful of differing viewpoints and experiences
13+
- Gracefully accepting constructive criticism
14+
- Focusing on what is best for the community
15+
- Showing empathy toward other community members
16+
17+
Examples of unacceptable behavior:
18+
19+
- Harassment, intimidation, or discrimination
20+
- Public or private insults and derogatory comments
21+
- Publishing others’ private information without consent
22+
- Any other conduct reasonably considered inappropriate
23+
24+
## Enforcement
25+
26+
Instances of unacceptable behavior may be reported by contacting the project team at `<hello@openapi.com>`. All complaints will be reviewed promptly and fairly.
27+
28+
## Attribution
29+
30+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.

docs/contributing.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Contributing to Openapi SDK
2+
3+
Thanks for considering contributing! 🎉
4+
We welcome all kinds of contributions: bug reports, feature requests, documentation improvements, and code enhancements.
5+
6+
## How to Contribute
7+
8+
1. **Fork the repository** and clone it locally:
9+
```bash
10+
git clone https://github.com/<username>/<repo>.git
11+
```
12+
13+
2. **Create a branch** for your feature or fix:
14+
```bash
15+
git checkout -b feature/your-feature-name
16+
```
17+
18+
3. **Make your changes** and commit them:
19+
```bash
20+
git commit -m "Add some feature"
21+
```
22+
23+
4. **Push your branch** to your fork:
24+
```bash
25+
git push origin feature/your-feature-name
26+
```
27+
28+
5. **Open a Pull Request** describing your changes.
29+
30+
## Guidelines
31+
32+
* Follow the existing **Rust coding style**.
33+
* Include **tests** for new features or bug fixes when applicable.
34+
* Keep **commit messages clear and concise**.
35+
* Update **documentation** as needed for your changes.
36+
37+
## Reporting Issues
38+
39+
To report bugs or request features, please **open an issue** on GitHub including:
40+
41+
* Clear description of the problem or feature.
42+
* Steps to reproduce (if applicable).
43+
* Relevant logs or screenshots.
44+
45+
Thank you for helping improve Openapi SDK! 🚀

0 commit comments

Comments
 (0)