Skip to content
forked from saloonphp/saloon

🤠 A PHP package for interacting with third-party APIs or building SDKs.

License

Notifications You must be signed in to change notification settings

BadJacky/Saloon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1752

🚪 Saloon 🚪

A Laravel / PHP package that helps you build beautiful API integrations and SDKs.

Build Status

Click here to read the documentation

Introduction

Saloon offers a fluent, object-oriented wrapper to build your next API integration or PHP SDK. It makes sharing API requests throughout your application a breeze. You don’t have to configure a HTTP client, so you can start sending requests really quickly.

If you need request faking for your tests, Saloon has it out of the box alongside many other useful tools like OAuth2 boilerplate and caching. If you use Laravel, there's also a dedicated Laravel package with artisan console commands to help you build even faster.

<?php

use App\Http\Saloon\Requests\GetForgeServerRequest;

$request = new GetForgeServerRequest(serverId: '123456');

$response = $request->send();
$data = $response->json();

Features

  • Simple, easy to learn syntax that standardises the way you interact with APIs
  • Abstract API integrations into classes so you can keep your code DRY
  • Configuration is fast and can be shared across all your requests
  • Built on top of Guzzle, one of the most popular PHP HTTP clients.
  • Framework agnostic
  • Mocking requests for testing
  • Great for building your own PHP SDKs
  • Authentication & OAuth2 boilerplate already built for you
  • Scalable with lots of API integrations across many team members

Documentation

Click here to read the documentation

Why Saloon?

Building API integrations can be time consuming. After you have found an API client to use, you’re faced with lots of configuration to remember and it’s hard to repeat requests without copying and pasting, and then when you introduce patterns like OAuth2 everything gets complicated. You’ll often find yourself writing the same boilerplate code over and over again.

We’ve standardised the way we talk to APIs with PSR-7 and PSR-18 but we haven’t got a standard structure to build API integrations.

Saloon aims to solve this.

Contributing

Please see here for more details about contributing.

Security

Please see here for our security policy.

Banner Image Credit

  • Freepik.com

About

🤠 A PHP package for interacting with third-party APIs or building SDKs.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%