2017-25 © Pedro Peláez
 

library wkop

Wykop API client

image

dragu/wkop

Wykop API client

  • Thursday, April 26, 2018
  • by dragu
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 6 Versions
  • 20 % Grown

The README.md

Simple Wykop client library

Instalation

You'll need to add the package to the require section of your app composer.json file:, (*1)

"matiit/wkop": "dev-master"

And execute, (*2)

composer update

Usage


<?php use Wkop\Factory; $client = Factory::get('APP KEY', 'SECRET KEY'); $client->setUserCredentials('USER LOGIN', 'USER ACCOUNT KEY'); $client->logIn(); // Read resources // Resource name, method parameters, api parameters $results = $client->get('stream', ['index'], ['page' => 1]); // Post to resources // Resource name, method parameters, api parameters, post parameters $result = $client->post('entries', ['add'], [], ['body' => "test"]);

Connecting accounts


<?php use Wkop\Factory; $url = Wkop\Helpers::Wkop\Helpers::getConnectUrl('REDIRECT URL', 'APP KEY', 'SECRET KEY'); $client = Factory::get('APP KEY', 'SECRET KEY'); /** * User should be redirected to that link. * He'll be asked to accept permissions and will be able to connect. * After clicking connect, he will be redirected back to your application to the REDIRECT URL * Handling Response is up to you. * Official Wykop documentation about response format: * http://www.wykop.pl/dla-programistow/dokumentacja/#info6_7_5 * * * In result you'll acquire two variables: * User login * User token (also called user key) */ // Here, get those variables. // And use them: $client->setUserCredentials('USER LOGIN', 'USER ACCOUNT KEY'); $client->logIn(); // From this moment, you will be able to make API calls as logged user.

Ideas

Got an improvement idea? Mail me or send PullRequests., (*3)

The Versions

26/04 2018

dev-master

9999999-dev

Wykop API client

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Mateusz Tracz

client wykop

31/03 2018

dev-https

dev-https

Wykop API client

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Mateusz Tracz

client wykop

28/04 2015

dev-add-login-example

dev-add-login-example

Wykop API client

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Mateusz Tracz

client wykop

14/12 2014

0.1.2

0.1.2.0

Wykop API client

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Mateusz Tracz

client wykop

14/12 2014

0.1.1

0.1.1.0

Wykop API client

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Mateusz Tracz

client wykop

15/11 2014

0.1

0.1.0.0

Wykop API client

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Mateusz Tracz

client wykop