code: function resolveCategory(categoryParam: number | string, defaultCategory: number): number {
    if (typeof categoryParam === 'number') {
      return categoryParam;
    }
  
    if (typeof categoryParam === 'string') {
      if (categoryParam in primaryCategoryNumbers) {
        return primaryCategoryNumbers[categoryParam];
      }
    }
  
    return defaultCategory;
  }
docs: Determine the category number from an category name ('movies', 'audio', etc)