PHPackages                             ghosh/designernews-php-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. ghosh/designernews-php-api

ActiveLibrary[API Development](/categories/api)

ghosh/designernews-php-api
==========================

A simple php wrapper for the Designer News API.

1.0.0(12y ago)18183MITPHPPHP &gt;=5.2.0

Since Feb 25Pushed 9y ago2 watchersCompare

[ Source](https://github.com/Ghosh/DesignerNews-PHP-API)[ Packagist](https://packagist.org/packages/ghosh/designernews-php-api)[ Docs](https://github.com/Ghosh/DesignerNews-PHP-API)[ RSS](/packages/ghosh-designernews-php-api/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Designer News PHP API
=====================

[](#designer-news-php-api)

About
-----

[](#about)

A simple php wrapper for the Designer News API.

Requirements
------------

[](#requirements)

- PHP 5.3.x or higher
- cURL
- A valid Designer News Access Token

oAuth 2
-------

[](#oauth-2)

This library assumes that you have already acquired a valid Access Token using your preferred oAuth library.

> Please note that as of this writing, the Designer News API only supports ClientCredentials and Password Grant Types.

Getting Started
---------------

[](#getting-started)

You can either download the latest version from the repo, or alternatively install it as a dependency with Composer.

### Installing with Composer

[](#installing-with-composer)

```
{
    "require": {
        "ghosh/designernews-php-api": "~1.0"
    }
}
```

Then run `composer.phar install` from your command line in your application root folder.

### Instantiating the class

[](#instantiating-the-class)

```
$config = array(
	"accessToken"  => "YOUR_ACCESS_TOKEN"
);

try
{
	$DN = new DesignerNews($config);
}
catch (Exception $e)
{
	echo $e->getMessage();
}
```

This creates a new instance of the Designer News API class and assigns it to the `$DN` handle. Its recommended to wrap this in a `try`/`catch` block to handle any errors that may arise.

### Configuration Options

[](#configuration-options)

- `accessToken` *Required* - This is the access token which would be provided to you by your oauth library
- `apiVersionSegment` *Optional* - The current api version. Will default to `v1`
- `userAgent` *Optional* - The user agent for the application. Designer News recommends setting it to your email address so that you can be contacted if any misuse of data is detected. Defaults to `designer-news-api-php-wrapper`

Available Methods
-----------------

[](#available-methods)

The wrapper includes convenient methods used to perform HTTP requests on behalf of the authenticated user. Below you will find a list of all available methods.

### User

[](#user)

```
$DN->me();
```

### Stories

[](#stories)

```
$DN->getStory($id);
$DN->upvoteStory($id);
$DN->commentOnStory($id, $comment);
$DN->getTopStories();
$DN->getRecentStories();
$DN->searchForStory($queryString);
```

### Comments

[](#comments)

```
$DN->getComment($id);
$DN->upvoteComment($id);
$DN->replyToComment($id, $reply);
```

### MOTD (Message of the day)

[](#motd-message-of-the-day)

```
$DN->getMOTD();
$DN->upvoteMOTD();
$DN->downvoteMOTD();
```

Response Type
-------------

[](#response-type)

All responses from the Designer News API PHP Wrapper are returned as PHP objects.

Feedback and Bugs
-----------------

[](#feedback-and-bugs)

Feel free to open a [new issue](https://github.com/Ghosh/DesignerNews-PHP-API/issues) here on github for any bug you may have come across or a feature which you would like added. Pull requests are most welcomed.

History
-------

[](#history)

##### Designer News 1.0

[](#designer-news-10)

- `release` - Initial Public Release
- `feature` - Added Packagist support

##### Designer News 0.1

[](#designer-news-01)

- `release` - Public Beta Release

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.3% 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

Unknown

Total

1

Last Release

4461d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ec83b9c79ec4449fc1fcb3de182d91af8c912ac83314c1153d1cac7585b015cf?d=identicon)[Ghosh](/maintainers/Ghosh)

---

Top Contributors

[![ghosh](https://avatars.githubusercontent.com/u/4667682?v=4)](https://github.com/ghosh "ghosh (12 commits)")[![brcontainer](https://avatars.githubusercontent.com/u/4368952?v=4)](https://github.com/brcontainer "brcontainer (1 commits)")

---

Tags

phpapiDesigner News

### Embed Badge

![Health badge](/badges/ghosh-designernews-php-api/health.svg)

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

###  Alternatives

[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

13998.4k2](/packages/jstolpe-instagram-graph-api-php-sdk)

PHPackages © 2026

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