{ "swagger": "2.0", "schemes": [ "http", "https" ], "basePath": "/svc/mostpopular/v2", "host": "api.nytimes.com", "info": { "version": "2.0.0", "title": "Most Popular API", "description": "Get lists of NYT Articles based on shares, emails, and views.", "logo": { "url": "img/logo_api_most_popular_150x150.png" } }, "produces": [ "application/json" ], "paths": { "/mostshared/{section}/{time-period}.json": { "parameters": [ { "$ref": "#/parameters/Section" }, { "$ref": "#/parameters/TimePeriod" } ], "get": { "summary": "Most Shared by Section & Time Period", "description": "", "operationId": "GET_mostshared-section-time-period-json", "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [], "responses": { "200": { "description": "An array of Articles", "schema": { "type": "object", "properties": { "status": { "type": "string" }, "copyright": { "type": "string" }, "num_results": { "type": "integer" }, "results": { "type": "array", "items": { "$ref": "#/definitions/Article" } } } }, "examples": { "application/json": { "status": "OK", "copyright": "Copyright (c) 2016 The New York Times Company. All Rights Reserved.", "results": [ { "url": "http://www.nytimes.com/2016/02/18/technology/apple-timothy-cook-fbi-san-bernardino.html", "column": "", "section": "Technology", "byline": "By ERIC LICHTBLAU and KATIE BENNER", "title": "Apple Fights Order to Unlock San Bernardino Gunman’s iPhone", "abstract": "Timothy D. Cook, Apple’s chief, said the government’s request to bypass security on the phone used by Syed Rizwan Farook had “chilling” implications.", "published_date": "2016-02-18", "source": "The New York Times", "asset_id": 100000004214575, "total_shares": 1, "des_facet": [ "IPHONE" ], "org_facet": [ "APPLE INC" ], "per_facet": [ "COOK, TIMOTHY D" ], "geo_facet": "", "media": [ { "type": "image", "subtype": "photo", "caption": "Timothy D. Cook, the chief executive of Apple, released a letter to customers several hours after a California judge ordered the company to unlock an iPhone used by one of the shooters in a recent attack that killed 14 people in San Bernardino.", "copyright": "Jeff Chiu/Associated Press", "media-metadata": [ { "url": "http://static01.nyt.com/images/2016/02/18/world/18Appleletter-web/18Appleletter-web-thumbStandard.jpg", "format": "Standard Thumbnail", "height": 75, "width": 75 } ] } ] } ], "num_results": 24 } } }, "400": { "description": "", "schema": { "type": "object", "properties": { "status": { "type": "string" }, "copyright": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "results": { "type": "array", "items": {} } } }, "examples": { "application/json": { "status": "ERROR", "copyright": "Copyright (c) 2016 The New York Times Company. All Rights Reserved.", "errors": [ "Please specify a supported period, options are: 1,7,30" ], "results": [] } } } }, "security": [ { "api-key": [] } ] } }, "/mostemailed/{section}/{time-period}.json": { "parameters": [ { "$ref": "#/parameters/Section" }, { "$ref": "#/parameters/TimePeriod" } ], "get": { "summary": "Most Emailed by Section & Time Period", "description": "", "operationId": "GET_mostemailed-section-time-period-json", "consumes": [ "application/json" ], "produces": [ "application/json", "application/xml" ], "parameters": [], "responses": { "200": { "description": "An array of Articles", "schema": { "type": "object", "properties": { "status": { "type": "string" }, "copyright": { "type": "string" }, "num_results": { "type": "integer" }, "results": { "type": "array", "items": { "$ref": "#/definitions/ArticleWithCountType" } } } } }, "400": { "description": "", "schema": { "type": "object", "properties": { "status": { "type": "string" }, "copyright": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "results": { "type": "array", "items": {} } } }, "examples": { "application/json": { "status": "ERROR", "copyright": "Copyright (c) 2016 The New York Times Company. All Rights Reserved.", "errors": [ "Param 'period' is invalid." ], "results": [] } } }, "403": { "description": "", "schema": { "type": "object" }, "examples": { "application/xml": "