PHPackages                             blua-blue/blua-blue-php-sdk - 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. blua-blue/blua-blue-php-sdk

ActiveLibrary[API Development](/categories/api)

blua-blue/blua-blue-php-sdk
===========================

PHP SDK for blua.blue

2.0.3(4y ago)021[2 PRs](https://github.com/blua-blue/blua-blue-php-sdk/pulls)GPL-3.0PHP

Since Nov 30Pushed 3y agoCompare

[ Source](https://github.com/blua-blue/blua-blue-php-sdk)[ Packagist](https://packagist.org/packages/blua-blue/blua-blue-php-sdk)[ RSS](/packages/blua-blue-blua-blue-php-sdk/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (5)Dependencies (2)Versions (8)Used By (0)

blua.blue PHP SDK
=================

[](#bluablue-php-sdk)

The goal of this package is to enable fast, secure and simple integration of your blua.blue content into own web domains. *NOTE*: this library also works for open-source installations of blua.blue

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

[](#installation)

`composer require blua-blue/blua-blue-php-sdk`

Usage
-----

[](#usage)

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

$client = new BluaBlue\Client('yourPublicKey', 'yourAPIkey');
try{
    $client->authenticate();
    $myArticles = $client->getOwnArticles();
    foreach ($myArticles as $article){
        echo $article->getName();
        echo $article->getContentHtml();
    }
} catch (Exception $e) {
 ...
}
```

Client Methods
--------------

[](#client-methods)

### Constructor

[](#constructor)

`$bluaBlue = new Client($publicKey, $apiKey=null, $apiEndpoint = 'https://blua.blue')`

### getArticle($articleSlugOrID)

[](#getarticlearticleslugorid)

This method accepts either the unique ID or the unique article-slug of a particular article.

### getOwnArticles()

[](#getownarticles)

Retrieves all owned articles regardless of publish-state

### getArticlesByKeywords($keywords)

[](#getarticlesbykeywordskeywords)

Comma-seperated or single keyword e.g.

`$phpTutorials = getArticlesByKeywords('php,tutorial');`

### getCategories()

[](#getcategories)

Retrieves a list of available categories

### getImages()

[](#getimages)

Retrieves stored images

### registerImage($pathOrBase64, $mode='external')

[](#registerimagepathorbase64-modeexternal)

MODES: external | upload

Either registers external images for reference or accepts base64 encoded image strings. (all browser-native content-types, max 600kb)

### createArticle($article)

[](#createarticlearticle)

Creates a new article. While you can pass in a simple array, we recommend using the wrapper:

```
$bluaBlue = new Client(getenv('publicKey'), getenv('apiKey'));
$newArticle = new \BluaBlue\Article();
$newArticle->setName('My awesome article');
$newArticle->setTeaser('What you always wanted to know about me');
$newArticle->setCategoryId('F7A3D7DFA54C11EB9242D83BBF2ADDD8');
$newArticle->setKeywords('biography');
$newArticle->addArticleContent([
    'sort'=>1,
    'content_type'=>'markdown',
    'content'=>'## hi there'
    ])
//...
$bluaBlue->createArticle($newArticle);
```

### updateArticle($article)

[](#updatearticlearticle)

Similar to createArticle, but operates on an existing article

```
$bluaBlue = new Client(getenv('publicKey'), getenv('apiKey'));
$myArticle = $bluaBlue->getArticle('my-awesome-article')
$myArticle->addArticleContent([
    'sort'=>count($myArticle->getArticleContent())+1,
    'content_type'=>'markdown',
    'content'=>'## chapter 2 ...'
    ]);
//...
$bluaBlue->updateArticle($myArticle);
```

Article Wrapper
---------------

[](#article-wrapper)

The article wrapper can be constructed with an array:

`new Article(['name'=>'How to set up x'])` or empty `new Article()`

Either way, the wrapper has setters and getters for the following properties:

- $id (getter only)
- $name
- $slug (getter only)
- $teaser
- $image\_id
- $author\_user\_id (setter will be overwritten by endpoint)
- $category\_id
- $is\_public
- $keywords
- $publish\_date
- $insert\_date (getter only)
- $update\_date
- $delete\_date
- $article\_content
- $article\_store

Example:

```
$new = new Article();
$new->setName('Title of my article');
echo $new->getName(); // prints 'Title of my article'
```

*NOTE*: you can let the endpoint determine certain values based on neoan3-db logik:

`$article->setDeleteDate('.')` will be translated to the current ("point") in time when the request is received. In other words, the SQL equivalent *NOW()*

Image Wrapper
-------------

[](#image-wrapper)

The image wrapper can be constructed with an array:

new Image(\['format'=&gt;'image/png'\]) or empty new Image()

Either way, the wrapper has setters and getters for the following properties:

- id (getter only)
- path
- format
- inserterUserId (getter only)

Example:

```
$new = new Image();
$new->setPath('https://s3.aws.com/234.asdf');
echo $new->getPath(); // prints 'https://s3.aws.com/234.asdf'
```

Additional methods on Article and Image
---------------------------------------

[](#additional-methods-on-article-and-image)

### toArray()

[](#toarray)

Exports object into assoc-array.

Additional method on Article
----------------------------

[](#additional-method-on-article)

### getContentHtml()

[](#getcontenthtml)

Exports a combined HTML-string from all contents

```
$article = $blueAblue->getArticle('best-article-I-wrote');
$allContent = $article->getContentHtml();
// equivalent to:
$allContent = '';
foreach($article->getArticleContent() as $content){
    $allContent .= $content['html'];
}
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~353 days

Total

3

Last Release

1656d ago

Major Versions

1.0.0 → 2.0.02021-11-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/92d2361b646651e3452a62d07274076346c4096480098a6c43d6c27ee28d460d?d=identicon)[neoan](/maintainers/neoan)

---

Top Contributors

[![sroehrl](https://avatars.githubusercontent.com/u/28542911?v=4)](https://github.com/sroehrl "sroehrl (13 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/blua-blue-blua-blue-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/blua-blue-blua-blue-php-sdk/health.svg)](https://phpackages.com/packages/blua-blue-blua-blue-php-sdk)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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