Overview

Namespaces

  • Upwork
    • API
      • AuthTypes
      • Interfaces
      • Routers
        • Activities
        • Freelancers
        • Hr
          • Clients
          • Freelancers
        • Jobs
        • Organization
        • Reports
          • Finance

Classes

  • Upwork\API\AuthTypes\AbstractOAuth
  • Upwork\API\AuthTypes\OAuth1
  • Upwork\API\AuthTypes\OAuthPHPLib
  • Upwork\API\Client
  • Upwork\API\Config
  • Upwork\API\Debug
  • Upwork\API\Routers\Activities\Engagement
  • Upwork\API\Routers\Activities\Team
  • Upwork\API\Routers\Auth
  • Upwork\API\Routers\Freelancers\Profile
  • Upwork\API\Routers\Freelancers\Search
  • Upwork\API\Routers\Hr\Clients\Applications
  • Upwork\API\Routers\Hr\Clients\Offers
  • Upwork\API\Routers\Hr\Contracts
  • Upwork\API\Routers\Hr\Engagements
  • Upwork\API\Routers\Hr\Freelancers\Applications
  • Upwork\API\Routers\Hr\Freelancers\Offers
  • Upwork\API\Routers\Hr\Interviews
  • Upwork\API\Routers\Hr\Jobs
  • Upwork\API\Routers\Hr\Milestones
  • Upwork\API\Routers\Hr\Roles
  • Upwork\API\Routers\Hr\Submissions
  • Upwork\API\Routers\Jobs\Profile
  • Upwork\API\Routers\Jobs\Search
  • Upwork\API\Routers\Messages
  • Upwork\API\Routers\Metadata
  • Upwork\API\Routers\Organization\Companies
  • Upwork\API\Routers\Organization\Teams
  • Upwork\API\Routers\Organization\Users
  • Upwork\API\Routers\Payments
  • Upwork\API\Routers\Reports\Finance\Accounts
  • Upwork\API\Routers\Reports\Finance\Billings
  • Upwork\API\Routers\Reports\Finance\Earnings
  • Upwork\API\Routers\Reports\Time
  • Upwork\API\Routers\Snapshot
  • Upwork\API\Routers\Teams
  • Upwork\API\Routers\Workdays
  • Upwork\API\Routers\Workdiary
  • Upwork\API\Utils

Interfaces

  • Upwork\API\Interfaces\Client

Exceptions

  • Upwork\API\ApiException
  • Overview
  • Namespace
  • Class
 1:  2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 
<?php
/**
 * Upwork auth library for using with public API by OAuth
 * Team API
 *
 * @final
 * @package     UpworkAPI
 * @since       05/19/2014
 * @copyright   Copyright 2014(c) Upwork.com
 * @author      Maksym Novozhylov <mnovozhilov@upwork.com>
 * @license     Upwork's API Terms of Use {@link https://developers.upwork.com/api-tos.html}
 */

namespace Upwork\API\Routers;

use Upwork\API\Debug as ApiDebug;
use Upwork\API\Client as ApiClient;

/**
 * Team API
 *
 * @link http://developers.upwork.com/Team-API
 */
final class Teams extends ApiClient
{
    const ENTRY_POINT = UPWORK_API_EP_NAME;

    /**
     * @var Client instance
     */
    private $_client;

    /**
     * Constructor
     *
     * @param   ApiClient $client Client object
     */
    public function __construct(ApiClient $client)
    {
        ApiDebug::p('init ' . __CLASS__ . ' router');
        $this->_client = $client;
        parent::$_epoint = self::ENTRY_POINT;
    }

    /**
     * Get Team Rooms
     *
     * @return  object
     */
    public function getList()
    {
        ApiDebug::p(__FUNCTION__);

        $response = $this->_client->get('/team/v2/teamrooms');
        ApiDebug::p('found response info', $response);

        return $response;
    }

    /**
     * Get specific team or company
     *
     * @param   string $team Teamroom or company ID
     * @param   array $params (Optional) Parameters
     * @return  object
     */
    public function getSpecific($team, $params = array())
    {
        ApiDebug::p(__FUNCTION__);

        $response = $this->_client->get('/team/v2/teamrooms/' . $team, $params);
        ApiDebug::p('found response info', $response);

        return $response;
    }
}
API documentation generated by ApiGen