PHP code example of talentcircles / php_sdk

1. Go to this page and download the library: Download talentcircles/php_sdk 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/ */

    

talentcircles / php_sdk example snippets


// Use your Network URL, App ID, and Api Key to connect to your API.
// It is reccomended that this information be kept somewhere in your
// project that is not accessible from the public html directory.
$network_url='https://127.0.1.1';
$app_id='romeo-5931c22e4190b';
$api_key='Y1IgDgriOjAo5hKMzZ0RxC';

$tc = new TalentCirclesSDK($network_url, $app_id, $api_key);

$obj_job = $tc->getJob(6579620);

$obj_job = $tc->getJob(6579620);

$job_ids = array(
    4551686,
    7480159
);
$ar_jobs = $tc->getJobs($job_ids);

$ar_users = $tc->getJobMatchingCandidates(6579620);

$ar_users = $tc->getSimilarJobs(6579620);

$jobTitle = "Advanced Front-end Developer";
$jobDescription = "We need somone really good at developing";

$jobDetails = array(
    'available_on' => 'November 14, 2017',
    'category_id' => 17,
    'commitment_level' => 'Full-Time',
    'apply_behavior' => 'url redirect',
    'urlRedirect' => 'https://talentcircles.com'
);

$ar_job = $tc->createJob($jobTitle, $jobDescription, $jobDetails);

$search_params = array(
    'tenants' => 570
);

$page = 1;
$results_per_page = 10;

$ar_jobs = $tc->searchJobs($search_params, $page, $results_per_page);

$job_id = 8698590;

$update_data = array(
    'available_on' => 'November 11, 2017',
    'commitment_level' => 'Part-Time',
);

$obj_job = $tc->updateJob($job_id, $update_data);

$user_id = 12770260;
$obj_user = $tc->getUser($user_id);

$user_ids = array(
    12770260,
    12769405
);
$ar_users = $tc->getUsers($user_ids);

$user_id = 12770260;
$ar_jobs = $tc->getUserMatchingJobs($user_id);

$user_id = 10961800;
$ar_stories = $tc->getUserStories($user_id);

$user_data = array(
    'firstname' => 'Gerald',
    'lastname' => 'de Jager',
    'email' => '[email protected]',
    'zipcode' => 78704
);

$ar_user = $tc->createUser($user_data);

$search_params = array(
    'circles' => 376
);

$page = 1;
$results_per_page = 10;

$ar_users = $tc->searchUsers($search_params, $page, $results_per_page);

$user_id = 12770260;

$update_data = array(
    'objective' => 'To improve my career a great deal.',
);

$obj_user = $tc->updateUser($user_id, $update_data);

$circle_id = 375;
$obj_circle = $tc->getCircle($circle_id);

$circle_ids = array(
    372,
    375
);
$ar_circles = $tc->getCircles($circle_ids);

$circle_id = 375;
$result_offset = 0;
$result_limit = 10;
$ar_jobs = $tc->getCircleJobs($circle_id, $result_offset, $result_limit);

$circle_id = 375;
$ar_members = $tc->getCircleMembers($circle_id);

$circle_data = array(
    'circle_name' => 'An Okay Test Circle',
    'owner_id' => 10961800
);
$obj_circle = $tc->createCircle($circle_data);

$circle_id = 375;
$story_details = array(
        'title' => 'A New Test Story',
        'story' => 'This story is really, really new.'
);

$obj_story = $tc->postCircleStory($circle_id, $story_details);

$circle_id = 384;
$update_data = array(
    'circle_name' => 'Great Test Circle',
);
$obj_circle = $tc->updateCircle($circle_id, $update_data);

$story_id = 196;
$obj_story = $tc->getStory($story_id);

$story_ids = array(
    196,
    197
);
$ar_stories = $tc->getStories($story_ids);

$story_data = array(
    'title' => 'A new test story ' . date("U"),
    'story' => 'This test story is really new.',
    'circle_id' => $circle_id
);
$obj_story = $tc->postStory($story_data);

$circle_ids = array(
    375,
    376
);
$story_data = array(
    'title' => 'Multiple Circle Test Story',
    'story' => 'This test story is being posted to two different circles.',
    'circle_id' => $circle_ids
);

$ar_stories = $tc->postStory($story_data);

$story_id = 240;
$story_data = array(
    'story' => 'The text of this story is being updated.',
);
$obj_story = $tc->updateStory($story_id, $story_data);

$story_ids = array(
    240,
    241
);
$story_data = array(
    'story' => 'The text of this story is being updated.',
);
$obj_story = $tc->updateStory($story_ids, $story_data);

$ composer