PHPackages                             aferalabs/traum - 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. aferalabs/traum

ActiveLibrary

aferalabs/traum
===============

traum-ferienwohnungen.de API client

0.2.1(10y ago)3771[3 issues](https://github.com/theDisco/traum/issues)MITPHPPHP &gt;=5.5.9

Since Mar 22Pushed 6y ago5 watchersCompare

[ Source](https://github.com/theDisco/traum)[ Packagist](https://packagist.org/packages/aferalabs/traum)[ RSS](/packages/aferalabs-traum/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

Traum
=====

[](#traum)

[![Build Status](https://camo.githubusercontent.com/4847fb3487dedf2df70a9c54557d31cee515b6b054f459265f68b189667a5076/68747470733a2f2f7472617669732d63692e6f72672f43726561746976654e61746976652f747261756d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/CreativeNative/traum)

Traum is an API client for clientapi.traum-ferienwohnungen.de.

Before you begin ...
====================

[](#before-you-begin-)

... register. In order to start using the API you need to register using register resource. Provide some basic information about the user and execute it once. If the request was correct, you will be able to start using the API. Remember to confirm your account.

```
use Traum\Client;
use Traum\Entity;
use Traum\Enum;

$client = Client::create();
$register = new Entity\Register(
    [
        'first_name' => 'John',
        'last_name' => 'Doe',
        'email' => 'john.doe@example.com',
        "salutation_id" => Enum\Salutation::MR,
        "password" => "Pa**word!"
    ]
);
$resource = $client->createRegisterResource();
$result = $resource->post($register); // returns Entity\Register
```

Creating Clients
================

[](#creating-clients)

After registering, the API user has to be assigned to the customer, whose listing you want to manage using the API. In order to do that use customer resource.

```
use Traum\Client;
use Traum\Entity;
use Traum\Enum;

// Get the customer_id from your customer account.
$customer = new Entity\Customer(
    [
        Entity\Customer::CUSTOMER_ID => 123456
    ]
);

$client = Client::create(['auth' => ['john.doe@example.com', 'Pa**word!']]);
$result = $client->createCustomerResource()->post($customer); // returns Entity\Customer
```

Creating listing
================

[](#creating-listing)

In order to hide the low level details of the API, you can use the provided services.

Listing Service
---------------

[](#listing-service)

To facilitate the creation of the listing, you can use the service to quickly create new listings.

```
$client = \Traum\Client::create(['auth' => ['john.doe@example.com', 'Pa**word!']]);
// You can obtain customerId from the customer resource or just read it from
// configuration, if you manage more than one customer.
$customerId = $client->createCustomerResource()->collection()->current()->getCustomerId();
$response = $client->createListingService()->addListing(
    $customerId,
    [
        'objectType' => \Traum\Enum\ObjectType::APARTMENT,
        'emailType' => \Traum\Enum\EmailType::HTML_TEXT,
        'accessibilityId' => \Traum\Enum\Accessibility::GROUND_LEVEL,
        'classificationStarId' => \Traum\Enum\ClassificationStar::ONE_STAR,
        'classificationExpireDate' => '2017-01-01',
        'maxPersons' => 4,
        'size' => 120
    ],
    [
        // You do not have to provide all the translations.
        \Traum\Enum\TextTypeId::LISTING_TITLE => [
            \Traum\Enum\Language::DEU => 'German LISTING_TITLE',
            \Traum\Enum\Language::ENG => 'English LISTING_TITLE',
        ],
        \Traum\Enum\TextTypeId::SHORT_DESCRIPTION => [
            \Traum\Enum\Language::DEU => 'German SHORT_DESCRIPTION',
            \Traum\Enum\Language::ENG => 'English SHORT_DESCRIPTION',
        ],
        \Traum\Enum\TextTypeId::LANDLORD_DESCRIPTION => [
            \Traum\Enum\Language::DEU => 'German LANDLORD_DESCRIPTION',
            \Traum\Enum\Language::ENG => 'English LANDLORD_DESCRIPTION',
        ],
        \Traum\Enum\TextTypeId::ARRIVAL_DESCRIPTION => [
            \Traum\Enum\Language::DEU => 'German ARRIVAL_DESCRIPTION',
            \Traum\Enum\Language::ENG => 'English ARRIVAL_DESCRIPTION',
        ],
        \Traum\Enum\TextTypeId::SPECIAL_ATTRIBUTES => [
            \Traum\Enum\Language::DEU => 'German SPECIAL_ATTRIBUTES',
            \Traum\Enum\Language::ENG => 'English SPECIAL_ATTRIBUTES',
        ],
        \Traum\Enum\TextTypeId::FREE_TIME_ACTIVITIES => [
            \Traum\Enum\Language::DEU => 'German FREE_TIME_ACTIVITIES',
            \Traum\Enum\Language::ENG => 'English FREE_TIME_ACTIVITIES',
        ],
        \Traum\Enum\TextTypeId::LISTING_DESCRIPTION => [
            \Traum\Enum\Language::DEU => 'German LISTING_DESCRIPTION',
            \Traum\Enum\Language::ENG => 'English LISTING_DESCRIPTION',
        ],
        \Traum\Enum\TextTypeId::ENVIRONMENT_DESCRIPTION => [
            \Traum\Enum\Language::DEU => 'German ENVIRONMENT_DESCRIPTION',
            \Traum\Enum\Language::ENG => 'English ENVIRONMENT_DESCRIPTION',
        ],
        \Traum\Enum\TextTypeId::VACATION_AREA_DESCRIPTION => [
            \Traum\Enum\Language::DEU => 'German VACATION_AREA_DESCRIPTION',
            \Traum\Enum\Language::ENG => 'English VACATION_AREA_DESCRIPTION',
        ],
        \Traum\Enum\TextTypeId::SERVICE_AVAILABILITY => [
            \Traum\Enum\Language::DEU => 'German SERVICE_AVAILABILITY',
            \Traum\Enum\Language::ENG => 'English SERVICE_AVAILABILITY',
        ],
    ]
); // returns \Traum\Entity\Listing
```

Picture Service
---------------

[](#picture-service)

To facilitate the creation of pictures, use picture service to add multiple pictures in bulk.

```
$client = \Traum\Client::create(['auth' => ['john.doe@example.com', 'Pa**word!']]);
// Use listing from the step before.
$listing = $client->createListingService()->addListing(/* ... */);
$client->createPictureService()->addPictures(
    $listing->getId(),
    [
        [
            'pictureUrl' => 'http://example.com/picture-outdoor.jpeg',
            'categoryId' => \Traum\Enum\PictureCategory::OUTDOOR,
            'titles' => [
                \Traum\Enum\Language::DEU => 'German OUTDOOR',
                \Traum\Enum\Language::ENG => 'English OUTDOOR',
            ],
        ],
        [
            'pictureUrl' => 'http://example.com/picture-environment.jpeg',
            'categoryId' => \Traum\Enum\PictureCategory::ENVIRONMENT,
            'titles' => [
                \Traum\Enum\Language::DEU => 'German ENVIRONMENT',
                \Traum\Enum\Language::ENG => 'English ENVIRONMENT',
            ],
        ],
        // ... and more
    ]
);
```

Want to help?
=============

[](#want-to-help)

Take a look at the [roadmap](https://github.com/theDisco/traum/wiki#roadmap) and implement one of the missing endpoints.

TODO
====

[](#todo)

- Finish documentation
- Implement missing resources
- Fix todos from the code
- Finish tests

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50.8% 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 ~8 days

Total

3

Last Release

3690d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/52ebd4244829f7eb4dead14eb87a704779640b6d6dd2cdeda556ce459ca10288?d=identicon)[the\_disco](/maintainers/the_disco)

---

Top Contributors

[![CreativeNative](https://avatars.githubusercontent.com/u/1124960?v=4)](https://github.com/CreativeNative "CreativeNative (31 commits)")[![theDisco](https://avatars.githubusercontent.com/u/199368?v=4)](https://github.com/theDisco "theDisco (30 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aferalabs-traum/health.svg)

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

###  Alternatives

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

22.8k69.3k](/packages/grumpydictator-firefly-iii)[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[concrete5/core

Concrete core subtree split

19159.3k48](/packages/concrete5-core)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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