MCPcopy Create free account
hub / github.com/GoogleChrome/webstatus.dev / getFeatures

Method getFeatures

frontend/src/static/js/api/client.ts:527–548  ·  view source on GitHub ↗
(
    q?: FeatureSearchType,
    sort?: FeatureSortOrderType,
    wptMetricView?: FeatureWPTMetricViewType,
    offset?: number,
    pageSize?: number,
  )

Source from the content-addressed store, hash-verified

525 }
526
527 // Get one page of features
528 public async getFeatures(
529 q?: FeatureSearchType,
530 sort?: FeatureSortOrderType,
531 wptMetricView?: FeatureWPTMetricViewType,
532 offset?: number,
533 pageSize?: number,
534 ): Promise<SuccessResponsePageableData<'/v1/features'>> {
535 const queryParams: paths['/v1/features']['get']['parameters']['query'] = {};
536 if (q) queryParams.q = q;
537 if (sort) queryParams.sort = sort;
538 if (wptMetricView) queryParams.wpt_metric_view = wptMetricView;
539 const pageToken = offset
540 ? this.createOffsetPaginationTokenForGetFeatures(offset)
541 : undefined;
542
543 return this.getPageOfData(
544 '/v1/features',
545 {params: {query: queryParams}},
546 pageToken,
547 pageSize,
548 );
549 }
550
551 // Get all features

Callers 2

constructorMethod · 0.80
_fetchFeaturesMethod · 0.80

Tested by

no test coverage detected