PHPackages                             sturents/api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. sturents/api

ActiveLibrary[API Development](/categories/api)

sturents/api
============

3.0.3(2mo ago)1112.7k↓17.8%9[3 PRs](https://github.com/sturents/api-php/pulls)MITPHPPHP &gt;=7.4

Since Feb 10Pushed 2mo ago8 watchersCompare

[ Source](https://github.com/sturents/api-php)[ Packagist](https://packagist.org/packages/sturents/api)[ RSS](/packages/sturents-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (64)Used By (0)

StuRents API Helper
===================

[](#sturents-api-helper)

\_Master branch is for v3 of the StuRents API. Please check releases for previous versions.

Install using composer:

```
php composer.phar require sturents/api

```

#### Wait, what's Composer?

[](#wait-whats-composer)

Composer is the de-facto package manager for PHP projects. If you haven't used it before it is very simple to set up.

1. Visit the [Composer download page](https://getcomposer.org/download/) and follow instructions to download composer into your project root.
2. You should now have a file called `composer.phar` in your project root. You can run [various commands](https://getcomposer.org/doc/03-cli.md) using this file.
3. Start by running `php composer.phar init` to create your `composer.json` file. This file stores all your project configuration and dependencies.
4. Now either run the command at the top of the readme to install the StuRents API, or add `"sturents/api": "*"` to the `"require"` object inside your `composer.json` file.

To use Composer dependencies inside a PHP file is simple - just the following to the top of your file:

```
require_once __DIR__.'/vendor/autoload.php';

```

Now you can create or use any object without having to worry about requiring its files - Composer and PHP's autoloader will handle that for you.

Send a property to StuRents
---------------------------

[](#send-a-property-to-sturents)

```
$property = new \SturentsLib\Api\Models\PropertyCreation;
// Use setters to create sub-objects and set properties as
// described in the documentation:
//   https://sturents.com/software/developer/house-create
// Or as demonstrated in `examples/send.php`

$upload_client = new \SturentsLib\Api\UploadClient(LANDLORD_ID, UPLOAD_KEY);
$put_property = new \SturentsLib\Api\Requests\PutProperty;
$put_property->setBody($property);
try {
    $response = $put_property->sendWith($upload_client);
}
catch (\Exception $e){
   echo "An unexpected problem happened: ".$e->getMessage();
}

if ($response instanceof PropertySaved){
	echo 'Property created with ID: '.$response->getPropertyId()."\n"; // outputs an integer
}
elseif ($response->isError()){
	echo 'A known error occurred of type '.get_class($response)."\n";
	echo json_encode($response)."\n";
}
else {
	echo 'An unknown error occurred of type '.get_class($response)."\n";
}

```

Fetch data from StuRents with a Landlord ID
-------------------------------------------

[](#fetch-data-from-sturents-with-a-landlord-id)

```
// Where LANDLORD_ID is an integer
$display_client = new \SturentsLib\Api\DisplayClient(LANDLORD_ID, DISPLAY_KEY);
$get_properties = new \SturentsLib\Api\Requests\GetProperties;
try {
    $response = $get_properties->sendWith($display_client);
}
catch (\Exception $e){
   echo "A problem happened: ".$e->getMessage();
}

var_dump($response instanceof ListProperties); // outputs 'true'

echo $response->pagination->pages // echo, e.g. 3

var_dump($response->properties[0] instanceof PropertyOutbound) // outputs 'true'

```

Fetch data from StuRents as a channel
-------------------------------------

[](#fetch-data-from-sturents-as-a-channel)

```
// Where *_ID values are strings
$display_client = new \SturentsLib\Api\ChannelClient(LANDLORD_ID, CHANNEL_ID, DISPLAY_KEY);
$get_properties = new \SturentsLib\Api\Requests\GetProperties;
try {
    $response = $get_properties->sendWith($display_client);
}
catch (\Exception $e){
   echo "A problem happened: ".$e->getMessage();
}

var_dump($response instanceof ListProperties); // outputs 'true'

echo $response->pagination->pages // echo, e.g. 3

var_dump($response->properties[0] instanceof PropertyOutbound) // outputs 'true'

```

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance86

Actively maintained with recent releases

Popularity37

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 87.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~69 days

Recently: every ~34 days

Total

54

Last Release

73d ago

Major Versions

0.3.0 → 1.0.02016-12-23

v1.3.x-dev → 2.0.02018-07-27

2.0.39 → 3.0.02026-02-10

PHP version history (5 changes)0.1.0PHP &gt;=5.5.0

2.0.0PHP &gt;=7.0

2.0.20PHP &gt;=7.1

2.0.28PHP &gt;=7.2

2.0.32PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e13cb42c1a004c15c986cc3ac59424757dd04b25ed4068146e41812f0410338?d=identicon)[m1ke](/maintainers/m1ke)

---

Top Contributors

[![M1ke](https://avatars.githubusercontent.com/u/1226123?v=4)](https://github.com/M1ke "M1ke (130 commits)")[![SDParish](https://avatars.githubusercontent.com/u/9200665?v=4)](https://github.com/SDParish "SDParish (10 commits)")[![craig-mcmahon](https://avatars.githubusercontent.com/u/5879594?v=4)](https://github.com/craig-mcmahon "craig-mcmahon (8 commits)")[![supratims](https://avatars.githubusercontent.com/u/3732209?v=4)](https://github.com/supratims "supratims (1 commits)")

###  Code Quality

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sturents-api/health.svg)

```
[![Health](https://phpackages.com/badges/sturents-api/health.svg)](https://phpackages.com/packages/sturents-api)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[saloonphp/saloon

Build beautiful API integrations and SDKs with Saloon

2.4k9.6M468](/packages/saloonphp-saloon)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[yoti/yoti-php-sdk

Yoti SDK for quickly integrating your PHP backend with Yoti

27539.9k1](/packages/yoti-yoti-php-sdk)[commercetools/commercetools-sdk

The official PHP SDK for the commercetools Composable Commerce APIs

19281.5k](/packages/commercetools-commercetools-sdk)[php-heroku-client/php-heroku-client

A PHP client for the Heroku Platform API

24404.8k4](/packages/php-heroku-client-php-heroku-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
