https://developer.zendesk.com/rest_api/docs/help_center/articles#list-articles
519781
def help_center_incremental_articles_list(self, start_time=None, **kwargs):
        ""
        api_path = "/api/v2/help_center/incremental/articles.json"
        api_query = {}
        if "query" in kwargs.keys():
            api_query.update(kwargs["query"])
            del kwargs["query"]
        if start_time:
            api_query.update({
                "start_time": start_time,
            })
        return self.call(api_path, query=api_query, **kwargs)
1059440
def build_related_articles(related_articles):
    
    article_list = []

    for related_article in related_articles:
        article = ea.RelatedArticle()
        if related_article.get('xlink_href'):
            article.xlink_href = related_article.get('xlink_href')
        if related_article.get('related_article_type'):
            article.related_article_type = related_article.get('related_article_type')
        if related_article.get('ext_link_type'):
            article.ext_link_type = related_article.get('ext_link_type')

        # Append it to our list
        article_list.append(article)

    return article_list
406005
def recent_articles(limit=10, exclude=None):
    """"""
    queryset = Article.objects.filter(published=True).order_by('-modified')
    if exclude:
        if hasattr(exclude, '__iter__'):
            queryset = queryset.exclude(pk__in=exclude)
        else:
            queryset = queryset.exclude(pk=exclude)
    return queryset
419109
def _getNextArticleBatch(self):
        """"""
        # try to get more uris, if none
        self._articlePage += 1
        # if we have already obtained all pages, then exit
        if self._totalPages != None and self._articlePage > self._totalPages:
            return
        self.setRequestedResult(RequestArticlesInfo(page=self._articlePage,
            sortBy=self._sortBy, sortByAsc=self._sortByAsc,
            returnInfo = self._returnInfo))
        if self._er._verboseOutput:
            print("Downloading article page %d..." % (self._articlePage))
        res = self._er.execQuery(self)
        if "error" in res:
            print("Error while obtaining a list of articles: " + res["error"])
        else:
            self._totalPages = res.get("articles", {}).get("pages", 0)
        results = res.get("articles", {}).get("results", [])
        self._articleList.extend(results)
720478
def list(object_type)
      url = generate_rest_url(:list, object_type)
      result = retrieve(url.path)
      parsed_result = parse_xml(result)
      find_object_in_result(parsed_result, object_type, :list)
    end
162419
def community_posts_list(self, filter_by=None, sort_by=None, **kwargs):
        ""
        api_path = "/api/v2/community/posts.json"
        api_query = {}
        if "query" in kwargs.keys():
            api_query.update(kwargs["query"])
            del kwargs["query"]
        if filter_by:
            api_query.update({
                "filter_by": filter_by,
            })
        if sort_by:
            api_query.update({
                "sort_by": sort_by,
            })
        return self.call(api_path, query=api_query, **kwargs)
914737
def help_center_article_translation_update(self, article_id, locale, data, **kwargs):
        ""
        api_path = "/api/v2/help_center/articles/{article_id}/translations/{locale}.json"
        api_path = api_path.format(article_id=article_id, locale=locale)
        return self.call(api_path, method="PUT", data=data, **kwargs)
506307
def fetch_and_parse_article_list(list, extraction_fields = nil)
      # list should be an array of objects of format {pmid: pmid, article: RayyanFormats::Target}
      @hercules_articles.fight(list) do |article|
        fetch_and_parse_detail_page(article.sid, article, extraction_fields) do |article|
          yield article if block_given?
        end
      end
    end
776236
def index
      @articles = Article.all

      respond_to do |format|
        format.html # index.html.erb
        format.json { render json: @articles }
      end
    end
1243307
def list(gandi, id, vhosts, dates, fqdns, limit):
    
    justify = 10
    options = {'items_per_page': limit, 'state': 'created'}

    output_keys = []

    if id:
        output_keys.append('id')

    output_keys.append('subject')

    if dates:
        output_keys.extend(['date_created', 'date_expire'])
        justify = 12

    if fqdns:
        output_keys.append('fqdns')

    if vhosts:
        output_keys.append('vhosts')

    result = gandi.hostedcert.list(options)

    for num, hcert in enumerate(result):
        if num:
            gandi.separator_line()

        if fqdns or vhosts:
            hcert = gandi.hostedcert.info(hcert['id'])

        output_hostedcert(gandi, hcert, output_keys, justify)

    return result
127989
def initWithArticleUriList(uriList):
        
        q = QueryArticles()
        assert isinstance(uriList, list), "uriList has to be a list of strings that represent article uris"
        q.queryParams = { "action": "getArticles", "articleUri": uriList }
        return q
579239
function editArticleInList(articles, level, newArticle) {
    return articles.map(function(article) {
        var articleLevel = article.getLevel();

        if (articleLevel === level) {
            // it is the article to edit
            return article.merge(newArticle);
        } else if (level.indexOf(articleLevel) === 0) {
            // it is a parent
            var articles = editArticleInList(article.getArticles(), level, newArticle);
            return article.set('articles', articles);
        } else {
            // This is not the article you are looking for
            return article;
        }
    });
}
1061799
def _list(self, uri, obj_class=None, body=None, return_raw=False,
            other_keys=None):
        
        if body:
            resp, resp_body = self.api.method_post(uri, body=body)
        else:
            resp, resp_body = self.api.method_get(uri)
        if return_raw:
            return (resp, resp_body)
        if obj_class is None:
            obj_class = self.resource_class

        data = self._data_from_response(resp_body)
        ret = [obj_class(self, res, loaded=False) for res in data if res]
        if other_keys:
            keys = utils.coerce_to_list(other_keys)
            other = [self._data_from_response(resp_body, key) for key in keys]
            return (ret, other)
        else:
            return ret
930611
function _fetchWordList(path, callback) {
    var words = [];

    axios.get(path)
    .then(function(response) {

      var jsonData = response.data;

      if(response.responseType === 'text') {
        jsonData = JSON.parse(jsonData);
      }

      if(Array.isArray(jsonData.words)) {
        words = jsonData.words;
      }

      callback(words);
    }.bind(this))
    .catch(function(error) {
      callback(words);
    }.bind(this));
  }
1287255
def list_questions(self):
        
        # 取得新 API 的結果
        data = self.get_question()
        # 實作相容的結構
        result = {}
        for number in data:
            # 繳交期限
            deadline = data[number]['deadline']
            # 是否已經過期限
            expired = '期限已到' if data[number]['expired'] else '期限未到'
            # 是否繳交
            status = '已繳' if data[number]['status'] else '未繳'
            # 程式語言種類
            language = data[number]['language']
            # 儲存題目資訊
            result[number] = [deadline, expired, status, language]
        # 回傳結果
        return result
314215
def list(self, verbose=False):
        

        response=api(url=self.__url+"/list", method="POST", verbose=verbose)
        return response
997012
public function article(HTTPRequest $request)
    {
        $params = $request->params();
        if ($params['ID']) {
            $article = Article::get()->filter(['HailID' => $params['ID']])->first();
            //Try to find the article with the database ID field, to be backward compatible with old Hail module (after upgrade)
            if(!isset($article) || empty($article)) {
                $article = Article::get()->filter(['ID' => $params['ID']])->first();
            }
        }

        if (!$params['ID'] || !isset($article) || empty($article)) {
            return $this->httpError(404, 'That article could not be found');
        }
        $data = [
            'Article' => $article,
            'Related' => null
        ];
        
        //Store the current article so we can use it in other functions in the controller
        $this->article = $article;

        //If Related Articles are enabled on the page (from the CMS)
        if ($this->owner->EnableRelated === "Yes") {
            //Try to find 3 related articles
            if ($article->PublicTags()->Count() > 0) {
                $related = Article::get()->filter(['PublicTags.ID' => $article->PublicTags()->map('ID', 'ID')->toArray()])->exclude(['HailID' => $params['ID']])->sort('Date DESC')->limit(3);
                if ($related->Count() > 0) {
                    $data['Related'] = $related;
                }
            }
        }

        return $data;
    }