GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - SocialConnect/common: [READ-ONLY] Subtree split of the SocialConnect Common Component

BranchesTags
Open more actions menu

Latest commit

 

History

46 Commits
46 Commits

Folders and files

NameName
Last commit message
Last commit date
Entity
Entity
 
 
Exception
Exception
 
 
ArrayHydrator.php
ArrayHydrator.php
 
 
ClientAbstract.php
ClientAbstract.php
 
 
Exception.php
Exception.php
 
 
HttpClient.php
HttpClient.php
 
 
HttpStack.php
HttpStack.php
 
 
README.md
README.md
 
 
composer.json
composer.json
 
 

Repository files navigation

Common Component

Build Client for your REST application

use SocialConnect\Common\ClientAbstract;

class MySocialNetworkClient extends ClientAbstract
{
  public function requestMethod($method, $parameters)
  {
    //...
  }
  
  public function getUser($id)
  {
    $result = $this->requestMethod('/user/get/', $id);
    if ($result) {
      $user = new User();
      $user->id = $result->id;
      //...
      
      return $user;
    }
    
    return false;
  }
}

Next you can use it

$client = new MySocialNetworkClient($appId, $appSecret);
// You can use any client that implements Psr\Http\Client\ClientInterface
$client->setHttpClient(new \SocialConnect\HttpClient\Curl());

$user = $client->getUser(1);

//Custom rest methods
$client->requestMethod('myTestMethod', []);
$client->requestMethod('myTest', []);

About

[READ-ONLY] Subtree split of the SocialConnect Common Component

socialconnect.lowl.io

Resources

Readme
Activity
Custom properties

Stars

6 stars

Watchers

4 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.