apiVersion: naftiko.io/v1 kind: Capability metadata: name: nyt-most-popular provider: new-york-times-company api: most-popular-api tags: - News - Analytics - Most Popular spec: summary: Retrieve most-emailed, most-shared, or most-viewed NYT articles. inputs: - name: metric type: string required: true enum: [emailed, shared, viewed] - name: period type: integer required: true enum: [1, 7, 30] - name: shareType type: string required: false enum: [email, facebook, twitter] description: Only applicable when metric=shared. outputs: - name: articles type: array operation: method: GET path: /{metric}/{period}[/{shareType}].json baseURL: https://api.nytimes.com/svc/mostpopular/v2 auth: type: apiKey in: query name: api-key