PHP code example of proximify / uniweb-api

1. Go to this page and download the library: Download proximify/uniweb-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

proximify / uniweb-api example snippets


$credentials = [
    "clientName" => "your_client_name",
    "clientSecret" => "your_client_secret",
    "homepage" => "your_uniweb_instance_url"
];

$client = new UniwebClient($credentials);
bash
# Get user profile information
GET {{BASE_API_URL}}/resource.php?action=read
    &resources[]=profile/affiliations
    &resources[]=profile/membership_information
    &id=833

# Get members by unit and title
GET {{BASE_API_URL}}/resource.php?action=read
    &resources[]=profile/affiliations
    &resources[]=profile/membership_information
    &filter[unit]=University of XYZ
    &filter[title]=Professor

# Get all members
GET {{BASE_API_URL}}/resource.php?action=getMembers&onlyPublic=0

# Get profile picture
GET {{BASE_API_URL}}/picture.php?action=display
    &contentType=members
    &id=833
    &quality=large
bash
   cd www
   php -S localhost:8000