PHPackages                             xzsoftware/wykopsdk - 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. xzsoftware/wykopsdk

ActiveLibrary[API Development](/categories/api)

xzsoftware/wykopsdk
===================

SDK dla Api v2 Wykopu

2.1.0(6y ago)2181[2 PRs](https://github.com/amodliszewski/wykopSDK/pulls)GPL-3.0-or-laterPHPPHP ^7.1

Since Feb 17Pushed 3y ago1 watchersCompare

[ Source](https://github.com/amodliszewski/wykopSDK)[ Packagist](https://packagist.org/packages/xzsoftware/wykopsdk)[ RSS](/packages/xzsoftware-wykopsdk/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (3)Versions (6)Used By (0)

WykopSDK - Software Development Kit for Wykop API v2
====================================================

[](#wykopsdk---software-development-kit-for-wykop-api-v2)

WykopSDK is a PHP Software Development Kit for Wykop, makes it easy to develop PHP apps for Wykop.

- Simple class to handle requests with reasonable groups.
- Handle all the magic for you.
- Fully object oriented!
- Throws exceptions on issues.
- Abstracts away the API, allowing you to write proper application code.

```
use XzSoftware\WykopSDK\Exceptions\ApiException;
use XzSoftware\WykopSDK\Profile\Request\Profile;
use XzSoftware\WykopSDK\SDK;
use XzSoftware\WykopSDK\UserManagement\Request\Login;

$sdk = SDK::buildNewSDK('APP_KEY','APP_SECRET');
try {
    $loginResponse = $sdk->auth()->logIn(new Login('USER_NAME', 'USER_ACCOUNT_KEY'));
    $sdk->auth()->authUser('micke', $loginResponse->getUserKey());
    $sdk->profiles()->getProfile(new Profile('micke'));
} catch (ApiException $e) {
    echo $e->getMessage();
    die();
}
```

Installing
----------

[](#installing)

The recommended way to install is through [Composer](http://getcomposer.org).

```
# Install Composer
curl -sS https://getcomposer.org/installer | php
```

Next, run the Composer command to install the latest stable version:

```
php composer.phar require xzsoftware/wykopsdk
```

After installing, you need to require Composer's autoloader:

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

You can then later update wykopSDK using composer:

```
php composer.phar update
```

Usage
-----

[](#usage)

Starting point is allways to create new SDK instance. It requires yours Wykop App Key and Secret -&gt; you can get them [here](https://www.wykop.pl/dla-programistow/twoje-aplikacje/).

You can also create [an new app](https://www.wykop.pl/dla-programistow/nowa-aplikacja/). Remember to check all needed permissions

```
$sdk = XzSoftware\WykopSDK\SDK\SDK::buildNewSDK('APP_KEY','APP_SECRET');
```

Auth
----

[](#auth)

If you want to do anything you need to start from user authentication. First of all user needs to connect via application connect link.

```
$sdk = XzSoftware\WykopSDK\SDK\SDK::buildNewSDK('APP_KEY','APP_SECRET');
$sdk->auth()->getConnectLink('127.0.0.1/redirectUrl'); // will return url that yuser needs to follow to access your app. He will be then redirected to redirectUrl param.

// on redirect page you need to read connect data
$data = $sdk->auth()->getAuthFromConnectData(
    $_GET['connectData']
);

// now you can authenticate user with this data:
$sdk->auth()->authUser($data->getLogin(), $data->getToken())
```

The other option is to access connection via USER\_APP\_KEY, that user needs to pass from his [settings](https://www.wykop.pl/ustawienia/sesje/)so this is more 'closed' option for power users

```
use XzSoftware\WykopSDK\SDK;
use XzSoftware\WykopSDK\UserManagement\Request\Login;

$sdk = SDK::buildNewSDK('APP_KEY','APP_SECRET');
$loginResponse = $sdk->auth()->logIn(new Login('USER_NAME', 'USER_ACCOUNT_KEY'));
$sdk->auth()->authUser('USER_NAME', $loginResponse->getUserKey());
```

Usage
-----

[](#usage-1)

Any endpoint group you can see on [docs](https://www.wykop.pl/dla-programistow/apiv2docs/)is handled by specific sdk group, represented in table below:

GroupHandles$sdk-&gt;addLink()[AddLink](https://www.wykop.pl/dla-programistow/apiv2docs/package/AddLink/)$sdk-&gt;auth()Authentication$sdk-&gt;entries()[Entries](https://www.wykop.pl/dla-programistow/apiv2docs/package/Entries/)$sdk-&gt;hits()[Hits](https://www.wykop.pl/dla-programistow/apiv2docs/package/Hits/)$sdk-&gt;links()[Links](https://www.wykop.pl/dla-programistow/apiv2docs/package/Links/)$sdk-&gt;myWykop()[MyWykop](https://www.wykop.pl/dla-programistow/apiv2docs/package/MyWykop/)$sdk-&gt;notifications()[Notifications](https://www.wykop.pl/dla-programistow/apiv2docs/package/Notifications/)$sdk-&gt;privateMessages()[PM](https://www.wykop.pl/dla-programistow/apiv2docs/package/Pm/)$sdk-&gt;profiles()[Profiles](https://www.wykop.pl/dla-programistow/apiv2docs/package/Profiles/)$sdk-&gt;search()[Search](https://www.wykop.pl/dla-programistow/apiv2docs/package/Search/)$sdk-&gt;settings()[Settings](https://www.wykop.pl/dla-programistow/apiv2docs/package/Settings/)$sdk-&gt;suggest()[Suggest](https://www.wykop.pl/dla-programistow/apiv2docs/package/Suggest/)$sdk-&gt;tags()[Tags](https://www.wykop.pl/dla-programistow/apiv2docs/package/Tags/)Group can have sub group of endpoint handling specific stuff i.e. `$sdk->links()->related()`

Endpoint methods usualy accept specific request object as parameter that is needed to handle api call.

```
$sdk
    ->links()
    ->related()
    ->add(
        new \XzSoftware\WykopSDK\Links\Request\Related\Add(
            12345,
            'http://some.valid.url',
            'some title'
        )
    );
```

Few endpoints break that rule accepting one of few objects extending specific abstract (voting),

```
$sdk->links()->related()->vote(
        new \XzSoftware\WykopSDK\Links\Request\Related\VoteUp(1234, 12345)
    );
$sdk->links()->related()->vote(
        new \XzSoftware\WykopSDK\Links\Request\Related\VoteDown(1234, 12345)
    );
```

or accept simple value like string or int (when no other param is possible and that one is mandatory).

```
$sdk->privateMessages()->getConversation('username');
```

All request objects can accept needed params via constructor. Non mandatory params can be modified via setters. i.e

```
$followersRequest = new \XzSoftware\WykopSDK\Profile\Request\Followers('user');
$followersRequest->setPage(3);
$sdk->profiles()->getFollowers($followersRequest);
```

#### IMPORTANT

[](#important)

Each request object has public methods:

```
    $request->setUserKey('key');
    $request->setAppKey('key');
```

There is no need to set these two params. SDK client will handle it for you!

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Total

3

Last Release

2221d ago

Major Versions

1.0.0 → 2.0.02019-02-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/025373a31050fc14e6de0191050530b40c8dbad634d655ea130b9638c73f88a1?d=identicon)[amodliszewski](/maintainers/amodliszewski)

---

Top Contributors

[![amodliszewski](https://avatars.githubusercontent.com/u/1456990?v=4)](https://github.com/amodliszewski "amodliszewski (6 commits)")

---

Tags

apisdkwykopwykopsdkwykopapi

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/xzsoftware-wykopsdk/health.svg)

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

###  Alternatives

[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[kucoin/kucoin-futures-php-sdk

PHP SDK for KuCoin Futures API

111.9k](/packages/kucoin-kucoin-futures-php-sdk)

PHPackages © 2026

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