PHPackages                             diza/stocksnap - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. diza/stocksnap

ActiveLibrary[HTTP &amp; Networking](/categories/http)

diza/stocksnap
==============

Unofficial PHP HTTP client to access Stocksnap's API

v0.1.2(9y ago)0481MITPHPPHP &gt;=5.5.0CI failing

Since Jan 14Pushed 9y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

stocksnap-php
=============

[](#stocksnap-php)

Unofficial PHP HTTP client to access Stocksnap's API

Installation
------------

[](#installation)

`Stocksnap-PHP` uses [Composer](https://getcomposer.org/). To use it, require the library

```
composer require diza/stocksnap

```

Usage
-----

[](#usage)

### API methods

[](#api-methods)

#### Diza\\Stocksnap\\HttpClient-&gt;all\_photos($order\_by, $sort\_order, $page)

[](#dizastocksnaphttpclient-all_photosorder_by-sort_order-page)

Retrieve a list of photos.

*Note:* You need to instantiate an httpclient object first

**Arguments**

ArgumentTypeOpt/RequiredNote`$order_by`stringOpt *(Default: date)*Accepted values: `date`, `trending`, `views`, `downloads`, `favorites``$sort_order`stringOpt *(Default: desc)*Accepted values: `asc`, `desc``$page`intOpt *(Default: 1)***Example**

```
$stocksnap = new Diza\Stocksnap\HttpClient();
$photos = $stocksnap->all_photos($order_by, $sort_order, $page);
```

===

#### Diza\\Stocksnap\\HttpClient-&gt;author\_photos($author\_id, $page)

[](#dizastocksnaphttpclient-author_photosauthor_id-page)

Retrieve author's/user's photos.

*Note:* You need to instantiate an httpclient object first

**Arguments**

ArgumentTypeOpt/Required`$author_id`intRequired`$page`intOpt *(Default: 1)***Example**

```
$stocksnap = new Diza\Stocksnap\HttpClient();
$photos = $stocksnap->author_photos($author_id, $page);
```

===

#### Diza\\Stocksnap\\HttpClient-&gt;search($terms, $$order\_by, $sort\_order, $page)

[](#dizastocksnaphttpclient-searchterms-order_by-sort_order-page)

Retrieve photos for a search term.

*Note:* You need to instantiate an httpclient object first

**Arguments**

ArgumentTypeOpt/RequiredNote`$terms`stringRequiredSearch terms (separated by `+`)`$order_by`stringOpt *(Default: relevance)*Accepted values: `relevance`, `date`, `trending`, `views`, `downloads`, `favorites``$sort_order`stringOpt *(Default: desc)*Accepted values: `asc`, `desc``$page`intOpt *(Default: 1)***Example**

```
$stocksnap = new Diza\Stocksnap\HttpClient();
$photos = $stocksnap->search($terms, $order_by, $sort_order, $page);
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

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 ~0 days

Total

3

Last Release

3401d ago

### Community

Maintainers

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

---

Tags

httpclienthttp clientweb serviceStocksnap

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/diza-stocksnap/health.svg)

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

###  Alternatives

[zoonman/pixabay-php-api

PixabayClient is a PHP HTTP client library to access Pixabay's API

3354.7k](/packages/zoonman-pixabay-php-api)[e-moe/guzzle6-bundle

Integrates Guzzle 6 into your Symfony application

11259.2k](/packages/e-moe-guzzle6-bundle)[jshensh/php-curl-class

PHP HTTP client, based on cURL

532.8k](/packages/jshensh-php-curl-class)

PHPackages © 2026

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