https://developer.zendesk.com/rest_api/docs/core/ticket_audits#list-all-ticket-audits
516446
def ticket_audits_list(self, cursor=None, **kwargs):
        ""
        api_path = "/api/v2/ticket_audits.json"
        api_query = {}
        if "query" in kwargs.keys():
            api_query.update(kwargs["query"])
            del kwargs["query"]
        if cursor:
            api_query.update({
                "cursor": cursor,
            })
        return self.call(api_path, query=api_query, **kwargs)
984555
def parse(self, ticket):
        
        if len(ticket) < self._min_ticket_size():
            raise TicketParseError(ticket, 'Invalid ticket length')

        digest_len = self._hash.digest_size * 2
        digest = ticket[:digest_len]

        try:
            time_len = 8
            time = int(ticket[digest_len:digest_len + time_len], 16)
        except:
            raise TicketParseError(ticket, 'Invalid time field')

        parts = ticket[digest_len + time_len:].split('!')
        if len(parts) != 3:
            raise TicketParseError(ticket, 'Missing parts')

        user_id = ulp.unquote(parts[0])
        tokens = ()
        if parts[1]:
            tokens = tuple((ulp.unquote(t) for t in parts[1].split(',')))

        user_data = ulp.unquote(parts[2])

        return TicketInfo(digest, user_id, tokens, user_data, time)
36878
def get_ticket(self, ticket_id):
        """"""
        url = 'tickets/%d' % ticket_id
        ticket = self._api._get(url)
        return Ticket(**ticket)
1081916
def suspended_ticket_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/suspended_tickets/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
1331058
def cli(env, identifier, count):
    """"""

    mgr = SoftLayer.TicketManager(env.client)

    ticket_id = helpers.resolve_id(mgr.resolve_ids, identifier, 'ticket')
    env.fout(ticket.get_ticket_results(mgr, ticket_id, update_count=count))
309841
def search(self, query):
        
        # Prepare the path
        log.debug("Query: {0}".format(query))
        path = self.url.path + '?Format=__id__+__Subject__'
        path += "&Order=ASC&OrderBy=id&Query=" + urllib.quote(query)

        # Get the tickets
        lines = self.get(path)
        log.info(u"Fetched tickets: {0}".format(len(lines)))
        return [self.parent.ticket(line, self.parent) for line in lines]
1183216
def ticket_comments(self, ticket_id, **kwargs):
        ""
        api_path = "/api/v2/tickets/{ticket_id}/comments.json"
        api_path = api_path.format(ticket_id=ticket_id)
        return self.call(api_path, **kwargs)
1368487
def get_ticket(self, ticket_id):
        
        mask = """mask[id, title, assignedUser[firstName, lastName],status,
                  createDate,lastEditDate,updates[entry,editor],updateCount, priority]"""
        return self.ticket.getObject(id=ticket_id, mask=mask)
481268
def audits
      json = client.get("/v1/sys/audit")
      json = json[:data] if json[:data]
      return Hash[*json.map do |k,v|
        [k.to_s.chomp("/").to_sym, Audit.decode(v)]
      end.flatten]
    end
1177023
def get_audits():
    
    audits = []
    audits.append(TemplatedFile('/etc/securetty', SecureTTYContext(),
                                template_dir=TEMPLATES_DIR,
                                mode=0o0400, user='root', group='root'))
    return audits
416748
public Collection<Ticket> getAll() {
        val tickets = new ArrayList<Ticket>();
        val metadata = this.ticketCatalog.findAll();
        metadata.forEach(r -> {
            val scan = new ScanRequest(r.getProperties().getStorageName());
            LOGGER.debug("Scanning table with request [{}]", scan);
            val result = this.amazonDynamoDBClient.scan(scan);
            LOGGER.debug("Scanned table with result [{}]", scan);
            tickets.addAll(result.getItems().stream().map(DynamoDbTicketRegistryFacilitator::deserializeTicket).collect(Collectors.toList()));
        });
        return tickets;
    }
977014
def verify_ticket(self, ticket):
        
        params = [('ticket', ticket), ('service', self.service_url)]
        url = (urllib_parse.urljoin(self.server_url, 'validate') + '?' +
               urllib_parse.urlencode(params))
        page = requests.get(
            url,
            stream=True,
            verify=self.verify_ssl_certificate
        )
        try:
            page_iterator = page.iter_lines(chunk_size=8192)
            verified = next(page_iterator).strip()
            if verified == 'yes':
                return next(page_iterator).strip(), None, None
            else:
                return None, None, None
        finally:
            page.close()
876839
protected List<AuditResult> getAuditResults(Iterable<Dashboard> dashboards) {
        int numberOfAuditDays = settings.getDays();
        long auditBeginDateTimeStamp = Instant.now().minus(Duration.ofDays(numberOfAuditDays)).toEpochMilli();
        long auditEndDateTimeStamp = Instant.now().toEpochMilli();
        LOGGER.info("NFRR Audit Collector audits with begin,end timestamps as " + auditBeginDateTimeStamp + "," + auditEndDateTimeStamp);

        dashboards.forEach((Dashboard dashboard) -> {
                Map<AuditType, Audit> auditMap = AuditCollectorUtil.getAudit(dashboard, settings,
                        auditBeginDateTimeStamp, auditEndDateTimeStamp);

                LOGGER.info("NFRR Audit Collector adding audit results for the dashboard : " + dashboard.getTitle());
                AuditCollectorUtil.addAuditResultByAuditType(dashboard, auditMap, cmdbRepository, auditEndDateTimeStamp);
        });
        return AuditCollectorUtil.getAuditResults();
    }
535057
def ticket_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/tickets/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
59064
@Override
    public synchronized List<EntityAuditEvent> listEvents(String entityId, String startKey, short maxResults)
            throws AtlasException {
        List<EntityAuditEvent> events = new ArrayList<>();
        String myStartKey = startKey;
        if (myStartKey == null) {
            myStartKey = entityId;
        }
        SortedMap<String, EntityAuditEvent> subMap = auditEvents.tailMap(myStartKey);
        for (EntityAuditEvent event : subMap.values()) {
            if (events.size() < maxResults && event.getEntityId().equals(entityId)) {
                events.add(event);
            }
        }
        return events;
    }
447677
def get_event_ticket_class(self, id, ticket_class_id, **data):
        
        
        return self.get("/events/{0}/ticket_classes/{0}/".format(id,ticket_class_id), data=data)
477283
def get_event_ticket_classes(self, id, **data):
        
        
        return self.get("/events/{0}/ticket_classes/".format(id), data=data)