https://developer.zendesk.com/rest_api/docs/core/ticket_forms#show-ticket-form
963911
def ticket_form_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/ticket_forms/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
754435
public function index()
    {
        $openedTickets = Ticket::where('user_id', '=', Auth::id())->where('open', true)->orderBy('updated_at', 'desc')->get();
        $closedTickets = Ticket::where('user_id', '=', Auth::id())->where('open', false)->orderBy('updated_at', 'desc')->get();

        return view('laralum_tickets::public.index', ['openedTickets' => $openedTickets, 'closedTickets' => $closedTickets]);
    }
1048615
def ticket_tags(self, id, **kwargs):
        ""
        api_path = "/api/v2/tickets/{id}/tags.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
209213
def ticket_field_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/ticket_fields/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
960666
private function getEditableTickets()
    {
        $tickets = ArrayList::create();
        foreach ($this->getTickets() as $ticket) {
            /** @var Ticket $ticket */
            $fieldName = $this->name . "[{$ticket->ID}][Amount]";
            $range = range($ticket->OrderMin, $ticket->OrderMax);

            $ticket->AmountField = DropdownField::create($fieldName, 'Amount', array_combine($range, $range))
                ->setHasEmptyDefault(true)
                ->setEmptyString(_t('TicketsField.EMPTY', 'Tickets'));

            // Set the first to hold the minimum
            if ($this->getTickets()->count() === 1) {
                $ticket->AmountField->setValue($ticket->OrderMin);
            }

            $availability = $ticket->Event()->getAvailability();
            if ($availability < $ticket->OrderMax) {
                $disabled = range($availability + 1, $ticket->OrderMax);
                $ticket->AmountField->setDisabledItems(array_combine($disabled, $disabled));
            }

            if (!$ticket->getAvailable()) {
                $ticket->AmountField->setDisabled(true);
            }

            $tickets->push($ticket);
        }
        return $tickets;
    }
297117
protected function refresh_js_api_ticket(){
        $config = $this -> config;
        if(!isset($config['app_id']) || !isset($config['app_secret']) || empty($config['app_id']) || empty($config['app_secret'])){
            if ($this->business_interface) $this->business_interface->log('refresh_js_api_ticket APP_ID or APP_SECRET must be set');
            return null;
        }
        $access_token = $this -> get_access_token();
        if (empty($access_token)){
            if ($this->business_interface) $this->business_interface->log('refresh_js_api_ticket access_token is null');
            return null;
        }
        $url = self::API_GET_TICKET."access_token={$access_token}&type=jsapi";
        $result = $this -> curl($url);
        if (isset($result['errcode']) && $result['errcode'] == 0 && isset($result['ticket'])){
            if ($this->business_interface)$this->business_interface->cache_js_api_ticket($result);
            return $result['ticket'];
        }elseif (isset($result['errmsg']) && $result['errmsg'] && $this->business_interface){
            $this->business_interface->log("refresh_js_api_ticket exception:{$result['errmsg']}");
        }
        return null;
    }
466786
def ticket_comment_make_private(self, ticket_id, id, data, **kwargs):
        ""
        api_path = "/api/v2/tickets/{ticket_id}/comments/{id}/make_private.json"
        api_path = api_path.format(ticket_id=ticket_id, id=id)
        return self.call(api_path, method="PUT", data=data, **kwargs)
69638
def requested(self, user, include=None):
        
        return self._query_zendesk(self.endpoint.requested, 'ticket', id=user, include=include)
732779
public function getGroupTicket()
    {
        $key = 'stoneworld.wechat.group_ticket.' . $this->appId;

        // for php 5.3
        $appId = $this->appId;
        $appSecret = $this->appSecret;
        $cache = $this->cache;
        $apiTicket = self::API_TICKET_CONTACT;

        return $this->cache->get(
            $key,
            function ($key) use ($appId, $appSecret, $cache, $apiTicket) {
                $http = new Http(new AccessToken($appId, $appSecret));

                $result = $http->get($apiTicket);

                $cache->set($key, $result, $result['expires_in']);

                return $result;
            }
        );
    }
392629
def post_ticket(self, title, body):
        '''

        '''

        # Populate the ticket
        ticket = {'subject': title,
                  'message': body }

        response = self.client.post("/api/v1/tickets.json", {
                                    'email': self.email,
                                    'ticket': ticket })['ticket']
        bot.info(response['url'])
36878
def get_ticket(self, ticket_id):
        """"""
        url = 'tickets/%d' % ticket_id
        ticket = self._api._get(url)
        return Ticket(**ticket)
935610
public function getJsapiTicket() {
		$time = time();
		if(empty($this->app->jsapi_ticket) || $this->app->jsapi_ticket_expired_at < $time) {
			$data = $this->getData('/cgi-bin/ticket/getticket', [
				'access_token' => $this->getAccessToken(),
				'type' => 'jsapi',
			]);
			if(isset($data['ticket']) && isset($data['expires_in'])) {
				$this->app->jsapi_ticket = $data['ticket'];
				$this->app->jsapi_ticket_expired_at = $time + $data['expires_in'];
				$this->app->save();
			}
		}

		return $this->app->jsapi_ticket;
	}
963350
def bind(self, ticket, device_id, user_id):
        
        return self._post(
            'bind',
            data={
                'ticket': ticket,
                'device_id': device_id,
                'openid': user_id
            }
        )
266155
def _make_ticket_node(ticket_id, config, options=None):
    """"""
    options = options or {}
    ref = config.jira_uri_template.format(ticket=ticket_id)
    link = nodes.reference(text=ticket_id, refuri=ref, **options)
    return link
445344
public function show($ticket = '')
    {
        Api::setApiUrl('https://mp.weixin.qq.com/');

        $this->module = 'showqrcode';

        $queryStr = ['ticket' => $ticket];

        $res = $this->_get('', $queryStr);

        if (!$res) {
            $this->setError('二维码获取失败');

            return false;
        }

        return $res;
    }
799081
def ticket_collaborators(self, id, **kwargs):
        ""
        api_path = "/api/v2/tickets/{id}/collaborators.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
914475
def ticket_metrics(self, ticket_id, **kwargs):
        ""
        api_path = "/api/v2/tickets/{ticket_id}/metrics.json"
        api_path = api_path.format(ticket_id=ticket_id)
        return self.call(api_path, **kwargs)