params) {
+ super(params);
+ }
+
+ public PIPESParams(String... params) {
+ super(params);
+ }
+
+ @Override
+ public String toString() {
+ return StringUtil.join(params.toArray(new String[0]), "|");
+ }
+ }
+
+}
diff --git a/api-lib/src/main/java/io/swagger/client/StringUtil.java b/api-lib/src/main/java/io/swagger/client/StringUtil.java
new file mode 100644
index 0000000..2e97f6c
--- /dev/null
+++ b/api-lib/src/main/java/io/swagger/client/StringUtil.java
@@ -0,0 +1,67 @@
+/*
+ * Top Stories V2
+ * The Top Stories API provides JSON and JSONP lists of articles and associated images by section.
+ *
+ * OpenAPI spec version: 2.0.0
+ *
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.swagger.client;
+
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-09-19T22:13:55.972-04:00")
+public class StringUtil {
+ /**
+ * Check if the given array contains the given value (with case-insensitive comparison).
+ *
+ * @param array The array
+ * @param value The value to search
+ * @return true if the array contains the value
+ */
+ public static boolean containsIgnoreCase(String[] array, String value) {
+ for (String str : array) {
+ if (value == null && str == null) return true;
+ if (value != null && value.equalsIgnoreCase(str)) return true;
+ }
+ return false;
+ }
+
+ /**
+ * Join an array of strings with the given separator.
+ *
+ * Note: This might be replaced by utility method from commons-lang or guava someday
+ * if one of those libraries is added as dependency.
+ *
+ *
+ * @param array The array of strings
+ * @param separator The separator
+ * @return the resulting string
+ */
+ public static String join(String[] array, String separator) {
+ int len = array.length;
+ if (len == 0) return "";
+
+ StringBuilder out = new StringBuilder();
+ out.append(array[0]);
+ for (int i = 1; i < len; i++) {
+ out.append(separator).append(array[i]);
+ }
+ return out.toString();
+ }
+}
diff --git a/api-lib/src/main/java/io/swagger/client/api/StoriesApi.java b/api-lib/src/main/java/io/swagger/client/api/StoriesApi.java
new file mode 100644
index 0000000..18180ba
--- /dev/null
+++ b/api-lib/src/main/java/io/swagger/client/api/StoriesApi.java
@@ -0,0 +1,33 @@
+package io.swagger.client.api;
+
+import io.swagger.client.CollectionFormats.*;
+
+
+import retrofit2.Call;
+import retrofit2.http.*;
+
+import okhttp3.RequestBody;
+
+import io.swagger.client.model.InlineResponse200;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public interface StoriesApi {
+ /**
+ * Top Stories
+ * The Top Stories API provides JSON and JSONP lists of articles and associated images by section.
+ * @param section The section the story appears in. (required)
+ * @param format if this is JSONP or JSON (required)
+ * @param callback The name of the function the API call results will be passed to. Required when using JSONP. This parameter has only one valid value per section. The format is {section_name}TopStoriesCallback. (optional)
+ * @return Call<InlineResponse200>
+ */
+
+ @GET("{section}.{format}")
+ Call sectionFormatGet(
+ @Path("section") String section, @Path("format") String format, @Query("callback") String callback
+ );
+
+}
diff --git a/api-lib/src/main/java/io/swagger/client/auth/ApiKeyAuth.java b/api-lib/src/main/java/io/swagger/client/auth/ApiKeyAuth.java
new file mode 100644
index 0000000..05bf956
--- /dev/null
+++ b/api-lib/src/main/java/io/swagger/client/auth/ApiKeyAuth.java
@@ -0,0 +1,68 @@
+package io.swagger.client.auth;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import okhttp3.Interceptor;
+import okhttp3.Request;
+import okhttp3.Response;
+
+public class ApiKeyAuth implements Interceptor {
+ private final String location;
+ private final String paramName;
+
+ private String apiKey;
+
+ public ApiKeyAuth(String location, String paramName) {
+ this.location = location;
+ this.paramName = paramName;
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+ public String getParamName() {
+ return paramName;
+ }
+
+ public String getApiKey() {
+ return apiKey;
+ }
+
+ public void setApiKey(String apiKey) {
+ this.apiKey = apiKey;
+ }
+
+ @Override
+ public Response intercept(Chain chain) throws IOException {
+ String paramValue;
+ Request request = chain.request();
+
+ if ("query".equals(location)) {
+ String newQuery = request.url().uri().getQuery();
+ paramValue = paramName + "=" + apiKey;
+ if (newQuery == null) {
+ newQuery = paramValue;
+ } else {
+ newQuery += "&" + paramValue;
+ }
+
+ URI newUri;
+ try {
+ newUri = new URI(request.url().uri().getScheme(), request.url().uri().getAuthority(),
+ request.url().uri().getPath(), newQuery, request.url().uri().getFragment());
+ } catch (URISyntaxException e) {
+ throw new IOException(e);
+ }
+
+ request = request.newBuilder().url(newUri.toURL()).build();
+ } else if ("header".equals(location)) {
+ request = request.newBuilder()
+ .addHeader(paramName, apiKey)
+ .build();
+ }
+ return chain.proceed(request);
+ }
+}
diff --git a/api-lib/src/main/java/io/swagger/client/auth/HttpBasicAuth.java b/api-lib/src/main/java/io/swagger/client/auth/HttpBasicAuth.java
new file mode 100644
index 0000000..c7b67e2
--- /dev/null
+++ b/api-lib/src/main/java/io/swagger/client/auth/HttpBasicAuth.java
@@ -0,0 +1,50 @@
+package io.swagger.client.auth;
+
+import java.io.IOException;
+
+import okhttp3.Interceptor;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.Response;
+import okhttp3.Credentials;
+
+public class HttpBasicAuth implements Interceptor {
+
+ private String username;
+ private String password;
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public void setCredentials(String username, String password) {
+ this.username = username;
+ this.password = password;
+ }
+
+ @Override
+ public Response intercept(Chain chain) throws IOException {
+ Request request = chain.request();
+
+ // If the request already have an authorization (eg. Basic auth), do nothing
+ if (request.header("Authorization") == null) {
+ String credentials = Credentials.basic(username, password);
+ request = request.newBuilder()
+ .addHeader("Authorization", credentials)
+ .build();
+ }
+ return chain.proceed(request);
+ }
+}
diff --git a/api-lib/src/main/java/io/swagger/client/auth/OAuth.java b/api-lib/src/main/java/io/swagger/client/auth/OAuth.java
new file mode 100644
index 0000000..97145ce
--- /dev/null
+++ b/api-lib/src/main/java/io/swagger/client/auth/OAuth.java
@@ -0,0 +1,176 @@
+package io.swagger.client.auth;
+
+import static java.net.HttpURLConnection.HTTP_UNAUTHORIZED;
+import static java.net.HttpURLConnection.HTTP_FORBIDDEN;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.oltu.oauth2.client.OAuthClient;
+import org.apache.oltu.oauth2.client.request.OAuthBearerClientRequest;
+import org.apache.oltu.oauth2.client.request.OAuthClientRequest;
+import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder;
+import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder;
+import org.apache.oltu.oauth2.client.response.OAuthJSONAccessTokenResponse;
+import org.apache.oltu.oauth2.common.exception.OAuthProblemException;
+import org.apache.oltu.oauth2.common.exception.OAuthSystemException;
+import org.apache.oltu.oauth2.common.message.types.GrantType;
+import org.apache.oltu.oauth2.common.token.BasicOAuthToken;
+
+import okhttp3.Interceptor;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.Request.Builder;
+import okhttp3.Response;
+
+public class OAuth implements Interceptor {
+
+ public interface AccessTokenListener {
+ public void notify(BasicOAuthToken token);
+ }
+
+ private volatile String accessToken;
+ private OAuthClient oauthClient;
+
+ private TokenRequestBuilder tokenRequestBuilder;
+ private AuthenticationRequestBuilder authenticationRequestBuilder;
+
+ private AccessTokenListener accessTokenListener;
+
+ public OAuth( OkHttpClient client, TokenRequestBuilder requestBuilder ) {
+ this.oauthClient = new OAuthClient(new OAuthOkHttpClient(client));
+ this.tokenRequestBuilder = requestBuilder;
+ }
+
+ public OAuth(TokenRequestBuilder requestBuilder ) {
+ this(new OkHttpClient(), requestBuilder);
+ }
+
+ public OAuth(OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes) {
+ this(OAuthClientRequest.tokenLocation(tokenUrl).setScope(scopes));
+ setFlow(flow);
+ authenticationRequestBuilder = OAuthClientRequest.authorizationLocation(authorizationUrl);
+ }
+
+ public void setFlow(OAuthFlow flow) {
+ switch(flow) {
+ case accessCode:
+ case implicit:
+ tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE);
+ break;
+ case password:
+ tokenRequestBuilder.setGrantType(GrantType.PASSWORD);
+ break;
+ case application:
+ tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS);
+ break;
+ default:
+ break;
+ }
+ }
+
+ @Override
+ public Response intercept(Chain chain)
+ throws IOException {
+
+ Request request = chain.request();
+
+ // If the request already have an authorization (eg. Basic auth), do nothing
+ if (request.header("Authorization") != null) {
+ return chain.proceed(request);
+ }
+
+ // If first time, get the token
+ OAuthClientRequest oAuthRequest;
+ if (getAccessToken() == null) {
+ updateAccessToken(null);
+ }
+
+ if (getAccessToken() != null) {
+ // Build the request
+ Builder rb = request.newBuilder();
+
+ String requestAccessToken = new String(getAccessToken());
+ try {
+ oAuthRequest = new OAuthBearerClientRequest(request.url().toString())
+ .setAccessToken(requestAccessToken)
+ .buildHeaderMessage();
+ } catch (OAuthSystemException e) {
+ throw new IOException(e);
+ }
+
+ for ( Map.Entry header : oAuthRequest.getHeaders().entrySet() ) {
+ rb.addHeader(header.getKey(), header.getValue());
+ }
+ rb.url( oAuthRequest.getLocationUri());
+
+ //Execute the request
+ Response response = chain.proceed(rb.build());
+
+ // 401 most likely indicates that access token has expired.
+ // Time to refresh and resend the request
+ if ( response != null && (response.code() == HTTP_UNAUTHORIZED | response.code() == HTTP_FORBIDDEN) ) {
+ if (updateAccessToken(requestAccessToken)) {
+ return intercept( chain );
+ }
+ }
+ return response;
+ } else {
+ return chain.proceed(chain.request());
+ }
+ }
+
+ /*
+ * Returns true if the access token has been updated
+ */
+ public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException {
+ if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) {
+ try {
+ OAuthJSONAccessTokenResponse accessTokenResponse = oauthClient.accessToken(this.tokenRequestBuilder.buildBodyMessage());
+ if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) {
+ setAccessToken(accessTokenResponse.getAccessToken());
+ if (accessTokenListener != null) {
+ accessTokenListener.notify((BasicOAuthToken) accessTokenResponse.getOAuthToken());
+ }
+ return getAccessToken().equals(requestAccessToken);
+ } else {
+ return false;
+ }
+ } catch (OAuthSystemException e) {
+ throw new IOException(e);
+ } catch (OAuthProblemException e) {
+ throw new IOException(e);
+ }
+ }
+ return true;
+ }
+
+ public void registerAccessTokenListener(AccessTokenListener accessTokenListener) {
+ this.accessTokenListener = accessTokenListener;
+ }
+
+ public synchronized String getAccessToken() {
+ return accessToken;
+ }
+
+ public synchronized void setAccessToken(String accessToken) {
+ this.accessToken = accessToken;
+ }
+
+ public TokenRequestBuilder getTokenRequestBuilder() {
+ return tokenRequestBuilder;
+ }
+
+ public void setTokenRequestBuilder(TokenRequestBuilder tokenRequestBuilder) {
+ this.tokenRequestBuilder = tokenRequestBuilder;
+ }
+
+ public AuthenticationRequestBuilder getAuthenticationRequestBuilder() {
+ return authenticationRequestBuilder;
+ }
+
+ public void setAuthenticationRequestBuilder(AuthenticationRequestBuilder authenticationRequestBuilder) {
+ this.authenticationRequestBuilder = authenticationRequestBuilder;
+ }
+
+}
diff --git a/api-lib/src/main/java/io/swagger/client/auth/OAuthFlow.java b/api-lib/src/main/java/io/swagger/client/auth/OAuthFlow.java
new file mode 100644
index 0000000..9bddf47
--- /dev/null
+++ b/api-lib/src/main/java/io/swagger/client/auth/OAuthFlow.java
@@ -0,0 +1,30 @@
+/*
+ * Top Stories V2
+ * The Top Stories API provides JSON and JSONP lists of articles and associated images by section.
+ *
+ * OpenAPI spec version: 2.0.0
+ *
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.swagger.client.auth;
+
+public enum OAuthFlow {
+ accessCode, implicit, password, application
+}
diff --git a/api-lib/src/main/java/io/swagger/client/auth/OAuthOkHttpClient.java b/api-lib/src/main/java/io/swagger/client/auth/OAuthOkHttpClient.java
new file mode 100644
index 0000000..c9b6e12
--- /dev/null
+++ b/api-lib/src/main/java/io/swagger/client/auth/OAuthOkHttpClient.java
@@ -0,0 +1,72 @@
+package io.swagger.client.auth;
+
+import java.io.IOException;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.apache.oltu.oauth2.client.HttpClient;
+import org.apache.oltu.oauth2.client.request.OAuthClientRequest;
+import org.apache.oltu.oauth2.client.response.OAuthClientResponse;
+import org.apache.oltu.oauth2.client.response.OAuthClientResponseFactory;
+import org.apache.oltu.oauth2.common.exception.OAuthProblemException;
+import org.apache.oltu.oauth2.common.exception.OAuthSystemException;
+
+
+import okhttp3.Interceptor;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.Request.Builder;
+import okhttp3.Response;
+import okhttp3.MediaType;
+import okhttp3.RequestBody;
+
+
+public class OAuthOkHttpClient implements HttpClient {
+
+ private OkHttpClient client;
+
+ public OAuthOkHttpClient() {
+ this.client = new OkHttpClient();
+ }
+
+ public OAuthOkHttpClient(OkHttpClient client) {
+ this.client = client;
+ }
+
+ public T execute(OAuthClientRequest request, Map headers,
+ String requestMethod, Class responseClass)
+ throws OAuthSystemException, OAuthProblemException {
+
+ MediaType mediaType = MediaType.parse("application/json");
+ Request.Builder requestBuilder = new Request.Builder().url(request.getLocationUri());
+
+ if(headers != null) {
+ for (Entry entry : headers.entrySet()) {
+ if (entry.getKey().equalsIgnoreCase("Content-Type")) {
+ mediaType = MediaType.parse(entry.getValue());
+ } else {
+ requestBuilder.addHeader(entry.getKey(), entry.getValue());
+ }
+ }
+ }
+
+ RequestBody body = request.getBody() != null ? RequestBody.create(mediaType, request.getBody()) : null;
+ requestBuilder.method(requestMethod, body);
+
+ try {
+ Response response = client.newCall(requestBuilder.build()).execute();
+ return OAuthClientResponseFactory.createCustomResponse(
+ response.body().string(),
+ response.body().contentType().toString(),
+ response.code(),
+ responseClass);
+ } catch (IOException e) {
+ throw new OAuthSystemException(e);
+ }
+ }
+
+ public void shutdown() {
+ // Nothing to do here
+ }
+
+}
diff --git a/api-lib/src/main/java/io/swagger/client/model/Article.java b/api-lib/src/main/java/io/swagger/client/model/Article.java
new file mode 100644
index 0000000..f162f3e
--- /dev/null
+++ b/api-lib/src/main/java/io/swagger/client/model/Article.java
@@ -0,0 +1,565 @@
+/*
+ * Top Stories V2
+ * The Top Stories API provides JSON and JSONP lists of articles and associated images by section.
+ *
+ * OpenAPI spec version: 2.0.0
+ *
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import com.google.gson.annotations.SerializedName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.client.model.ArticleMultimedia;
+import io.swagger.client.model.ArticleRelatedUrls;
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * Article
+ */
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-09-19T22:13:55.972-04:00")
+public class Article {
+ @SerializedName("section")
+ private String section = null;
+
+ @SerializedName("subsection")
+ private String subsection = null;
+
+ @SerializedName("title")
+ private String title = null;
+
+ @SerializedName("abstract")
+ private String _abstract = null;
+
+ @SerializedName("url")
+ private String url = null;
+
+ @SerializedName("thumbnail_standard")
+ private String thumbnailStandard = null;
+
+ @SerializedName("short_url")
+ private String shortUrl = null;
+
+ @SerializedName("byline")
+ private String byline = null;
+
+ @SerializedName("item_type")
+ private String itemType = null;
+
+ @SerializedName("updated_date")
+ private String updatedDate = null;
+
+ @SerializedName("created_date")
+ private String createdDate = null;
+
+ @SerializedName("published_date")
+ private String publishedDate = null;
+
+ @SerializedName("material_type_facet")
+ private String materialTypeFacet = null;
+
+ @SerializedName("kicker")
+ private String kicker = null;
+
+ @SerializedName("des_facet")
+ private List desFacet = new ArrayList();
+
+ @SerializedName("org_facet")
+ private String orgFacet = null;
+
+ @SerializedName("per_facet")
+ private List perFacet = new ArrayList();
+
+ @SerializedName("geo_facet")
+ private List geoFacet = new ArrayList();
+
+ @SerializedName("multimedia")
+ private List multimedia = new ArrayList();
+
+ @SerializedName("related_urls")
+ private List relatedUrls = new ArrayList();
+
+ public Article section(String section) {
+ this.section = section;
+ return this;
+ }
+
+ /**
+ * Get section
+ * @return section
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getSection() {
+ return section;
+ }
+
+ public void setSection(String section) {
+ this.section = section;
+ }
+
+ public Article subsection(String subsection) {
+ this.subsection = subsection;
+ return this;
+ }
+
+ /**
+ * Get subsection
+ * @return subsection
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getSubsection() {
+ return subsection;
+ }
+
+ public void setSubsection(String subsection) {
+ this.subsection = subsection;
+ }
+
+ public Article title(String title) {
+ this.title = title;
+ return this;
+ }
+
+ /**
+ * Get title
+ * @return title
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public Article _abstract(String _abstract) {
+ this._abstract = _abstract;
+ return this;
+ }
+
+ /**
+ * Get _abstract
+ * @return _abstract
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getAbstract() {
+ return _abstract;
+ }
+
+ public void setAbstract(String _abstract) {
+ this._abstract = _abstract;
+ }
+
+ public Article url(String url) {
+ this.url = url;
+ return this;
+ }
+
+ /**
+ * Get url
+ * @return url
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public Article thumbnailStandard(String thumbnailStandard) {
+ this.thumbnailStandard = thumbnailStandard;
+ return this;
+ }
+
+ /**
+ * Get thumbnailStandard
+ * @return thumbnailStandard
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getThumbnailStandard() {
+ return thumbnailStandard;
+ }
+
+ public void setThumbnailStandard(String thumbnailStandard) {
+ this.thumbnailStandard = thumbnailStandard;
+ }
+
+ public Article shortUrl(String shortUrl) {
+ this.shortUrl = shortUrl;
+ return this;
+ }
+
+ /**
+ * Get shortUrl
+ * @return shortUrl
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getShortUrl() {
+ return shortUrl;
+ }
+
+ public void setShortUrl(String shortUrl) {
+ this.shortUrl = shortUrl;
+ }
+
+ public Article byline(String byline) {
+ this.byline = byline;
+ return this;
+ }
+
+ /**
+ * Get byline
+ * @return byline
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getByline() {
+ return byline;
+ }
+
+ public void setByline(String byline) {
+ this.byline = byline;
+ }
+
+ public Article itemType(String itemType) {
+ this.itemType = itemType;
+ return this;
+ }
+
+ /**
+ * Get itemType
+ * @return itemType
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getItemType() {
+ return itemType;
+ }
+
+ public void setItemType(String itemType) {
+ this.itemType = itemType;
+ }
+
+ public Article updatedDate(String updatedDate) {
+ this.updatedDate = updatedDate;
+ return this;
+ }
+
+ /**
+ * Get updatedDate
+ * @return updatedDate
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getUpdatedDate() {
+ return updatedDate;
+ }
+
+ public void setUpdatedDate(String updatedDate) {
+ this.updatedDate = updatedDate;
+ }
+
+ public Article createdDate(String createdDate) {
+ this.createdDate = createdDate;
+ return this;
+ }
+
+ /**
+ * Get createdDate
+ * @return createdDate
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getCreatedDate() {
+ return createdDate;
+ }
+
+ public void setCreatedDate(String createdDate) {
+ this.createdDate = createdDate;
+ }
+
+ public Article publishedDate(String publishedDate) {
+ this.publishedDate = publishedDate;
+ return this;
+ }
+
+ /**
+ * Get publishedDate
+ * @return publishedDate
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getPublishedDate() {
+ return publishedDate;
+ }
+
+ public void setPublishedDate(String publishedDate) {
+ this.publishedDate = publishedDate;
+ }
+
+ public Article materialTypeFacet(String materialTypeFacet) {
+ this.materialTypeFacet = materialTypeFacet;
+ return this;
+ }
+
+ /**
+ * Get materialTypeFacet
+ * @return materialTypeFacet
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getMaterialTypeFacet() {
+ return materialTypeFacet;
+ }
+
+ public void setMaterialTypeFacet(String materialTypeFacet) {
+ this.materialTypeFacet = materialTypeFacet;
+ }
+
+ public Article kicker(String kicker) {
+ this.kicker = kicker;
+ return this;
+ }
+
+ /**
+ * Get kicker
+ * @return kicker
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getKicker() {
+ return kicker;
+ }
+
+ public void setKicker(String kicker) {
+ this.kicker = kicker;
+ }
+
+ public Article desFacet(List desFacet) {
+ this.desFacet = desFacet;
+ return this;
+ }
+
+ public Article addDesFacetItem(String desFacetItem) {
+ this.desFacet.add(desFacetItem);
+ return this;
+ }
+
+ /**
+ * Get desFacet
+ * @return desFacet
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public List getDesFacet() {
+ return desFacet;
+ }
+
+ public void setDesFacet(List desFacet) {
+ this.desFacet = desFacet;
+ }
+
+ public Article orgFacet(String orgFacet) {
+ this.orgFacet = orgFacet;
+ return this;
+ }
+
+ /**
+ * Get orgFacet
+ * @return orgFacet
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getOrgFacet() {
+ return orgFacet;
+ }
+
+ public void setOrgFacet(String orgFacet) {
+ this.orgFacet = orgFacet;
+ }
+
+ public Article perFacet(List perFacet) {
+ this.perFacet = perFacet;
+ return this;
+ }
+
+ public Article addPerFacetItem(String perFacetItem) {
+ this.perFacet.add(perFacetItem);
+ return this;
+ }
+
+ /**
+ * Get perFacet
+ * @return perFacet
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public List getPerFacet() {
+ return perFacet;
+ }
+
+ public void setPerFacet(List perFacet) {
+ this.perFacet = perFacet;
+ }
+
+ public Article geoFacet(List geoFacet) {
+ this.geoFacet = geoFacet;
+ return this;
+ }
+
+ public Article addGeoFacetItem(String geoFacetItem) {
+ this.geoFacet.add(geoFacetItem);
+ return this;
+ }
+
+ /**
+ * Get geoFacet
+ * @return geoFacet
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public List getGeoFacet() {
+ return geoFacet;
+ }
+
+ public void setGeoFacet(List geoFacet) {
+ this.geoFacet = geoFacet;
+ }
+
+ public Article multimedia(List multimedia) {
+ this.multimedia = multimedia;
+ return this;
+ }
+
+ public Article addMultimediaItem(ArticleMultimedia multimediaItem) {
+ this.multimedia.add(multimediaItem);
+ return this;
+ }
+
+ /**
+ * Get multimedia
+ * @return multimedia
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public List getMultimedia() {
+ return multimedia;
+ }
+
+ public void setMultimedia(List multimedia) {
+ this.multimedia = multimedia;
+ }
+
+ public Article relatedUrls(List relatedUrls) {
+ this.relatedUrls = relatedUrls;
+ return this;
+ }
+
+ public Article addRelatedUrlsItem(ArticleRelatedUrls relatedUrlsItem) {
+ this.relatedUrls.add(relatedUrlsItem);
+ return this;
+ }
+
+ /**
+ * Get relatedUrls
+ * @return relatedUrls
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public List getRelatedUrls() {
+ return relatedUrls;
+ }
+
+ public void setRelatedUrls(List relatedUrls) {
+ this.relatedUrls = relatedUrls;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Article article = (Article) o;
+ return Objects.equals(this.section, article.section) &&
+ Objects.equals(this.subsection, article.subsection) &&
+ Objects.equals(this.title, article.title) &&
+ Objects.equals(this._abstract, article._abstract) &&
+ Objects.equals(this.url, article.url) &&
+ Objects.equals(this.thumbnailStandard, article.thumbnailStandard) &&
+ Objects.equals(this.shortUrl, article.shortUrl) &&
+ Objects.equals(this.byline, article.byline) &&
+ Objects.equals(this.itemType, article.itemType) &&
+ Objects.equals(this.updatedDate, article.updatedDate) &&
+ Objects.equals(this.createdDate, article.createdDate) &&
+ Objects.equals(this.publishedDate, article.publishedDate) &&
+ Objects.equals(this.materialTypeFacet, article.materialTypeFacet) &&
+ Objects.equals(this.kicker, article.kicker) &&
+ Objects.equals(this.desFacet, article.desFacet) &&
+ Objects.equals(this.orgFacet, article.orgFacet) &&
+ Objects.equals(this.perFacet, article.perFacet) &&
+ Objects.equals(this.geoFacet, article.geoFacet) &&
+ Objects.equals(this.multimedia, article.multimedia) &&
+ Objects.equals(this.relatedUrls, article.relatedUrls);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(section, subsection, title, _abstract, url, thumbnailStandard, shortUrl, byline, itemType, updatedDate, createdDate, publishedDate, materialTypeFacet, kicker, desFacet, orgFacet, perFacet, geoFacet, multimedia, relatedUrls);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Article {\n");
+
+ sb.append(" section: ").append(toIndentedString(section)).append("\n");
+ sb.append(" subsection: ").append(toIndentedString(subsection)).append("\n");
+ sb.append(" title: ").append(toIndentedString(title)).append("\n");
+ sb.append(" _abstract: ").append(toIndentedString(_abstract)).append("\n");
+ sb.append(" url: ").append(toIndentedString(url)).append("\n");
+ sb.append(" thumbnailStandard: ").append(toIndentedString(thumbnailStandard)).append("\n");
+ sb.append(" shortUrl: ").append(toIndentedString(shortUrl)).append("\n");
+ sb.append(" byline: ").append(toIndentedString(byline)).append("\n");
+ sb.append(" itemType: ").append(toIndentedString(itemType)).append("\n");
+ sb.append(" updatedDate: ").append(toIndentedString(updatedDate)).append("\n");
+ sb.append(" createdDate: ").append(toIndentedString(createdDate)).append("\n");
+ sb.append(" publishedDate: ").append(toIndentedString(publishedDate)).append("\n");
+ sb.append(" materialTypeFacet: ").append(toIndentedString(materialTypeFacet)).append("\n");
+ sb.append(" kicker: ").append(toIndentedString(kicker)).append("\n");
+ sb.append(" desFacet: ").append(toIndentedString(desFacet)).append("\n");
+ sb.append(" orgFacet: ").append(toIndentedString(orgFacet)).append("\n");
+ sb.append(" perFacet: ").append(toIndentedString(perFacet)).append("\n");
+ sb.append(" geoFacet: ").append(toIndentedString(geoFacet)).append("\n");
+ sb.append(" multimedia: ").append(toIndentedString(multimedia)).append("\n");
+ sb.append(" relatedUrls: ").append(toIndentedString(relatedUrls)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/api-lib/src/main/java/io/swagger/client/model/ArticleMultimedia.java b/api-lib/src/main/java/io/swagger/client/model/ArticleMultimedia.java
new file mode 100644
index 0000000..68ba43e
--- /dev/null
+++ b/api-lib/src/main/java/io/swagger/client/model/ArticleMultimedia.java
@@ -0,0 +1,260 @@
+/*
+ * Top Stories V2
+ * The Top Stories API provides JSON and JSONP lists of articles and associated images by section.
+ *
+ * OpenAPI spec version: 2.0.0
+ *
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import com.google.gson.annotations.SerializedName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+
+/**
+ * ArticleMultimedia
+ */
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-09-19T22:13:55.972-04:00")
+public class ArticleMultimedia {
+ @SerializedName("url")
+ private String url = null;
+
+ @SerializedName("format")
+ private String format = null;
+
+ @SerializedName("height")
+ private Integer height = null;
+
+ @SerializedName("width")
+ private Integer width = null;
+
+ @SerializedName("type")
+ private String type = null;
+
+ @SerializedName("subtype")
+ private String subtype = null;
+
+ @SerializedName("caption")
+ private String caption = null;
+
+ @SerializedName("copyright")
+ private String copyright = null;
+
+ public ArticleMultimedia url(String url) {
+ this.url = url;
+ return this;
+ }
+
+ /**
+ * Get url
+ * @return url
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public ArticleMultimedia format(String format) {
+ this.format = format;
+ return this;
+ }
+
+ /**
+ * Get format
+ * @return format
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getFormat() {
+ return format;
+ }
+
+ public void setFormat(String format) {
+ this.format = format;
+ }
+
+ public ArticleMultimedia height(Integer height) {
+ this.height = height;
+ return this;
+ }
+
+ /**
+ * Get height
+ * @return height
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public Integer getHeight() {
+ return height;
+ }
+
+ public void setHeight(Integer height) {
+ this.height = height;
+ }
+
+ public ArticleMultimedia width(Integer width) {
+ this.width = width;
+ return this;
+ }
+
+ /**
+ * Get width
+ * @return width
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public Integer getWidth() {
+ return width;
+ }
+
+ public void setWidth(Integer width) {
+ this.width = width;
+ }
+
+ public ArticleMultimedia type(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get type
+ * @return type
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public ArticleMultimedia subtype(String subtype) {
+ this.subtype = subtype;
+ return this;
+ }
+
+ /**
+ * Get subtype
+ * @return subtype
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getSubtype() {
+ return subtype;
+ }
+
+ public void setSubtype(String subtype) {
+ this.subtype = subtype;
+ }
+
+ public ArticleMultimedia caption(String caption) {
+ this.caption = caption;
+ return this;
+ }
+
+ /**
+ * Get caption
+ * @return caption
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getCaption() {
+ return caption;
+ }
+
+ public void setCaption(String caption) {
+ this.caption = caption;
+ }
+
+ public ArticleMultimedia copyright(String copyright) {
+ this.copyright = copyright;
+ return this;
+ }
+
+ /**
+ * Get copyright
+ * @return copyright
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getCopyright() {
+ return copyright;
+ }
+
+ public void setCopyright(String copyright) {
+ this.copyright = copyright;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ArticleMultimedia articleMultimedia = (ArticleMultimedia) o;
+ return Objects.equals(this.url, articleMultimedia.url) &&
+ Objects.equals(this.format, articleMultimedia.format) &&
+ Objects.equals(this.height, articleMultimedia.height) &&
+ Objects.equals(this.width, articleMultimedia.width) &&
+ Objects.equals(this.type, articleMultimedia.type) &&
+ Objects.equals(this.subtype, articleMultimedia.subtype) &&
+ Objects.equals(this.caption, articleMultimedia.caption) &&
+ Objects.equals(this.copyright, articleMultimedia.copyright);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(url, format, height, width, type, subtype, caption, copyright);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ArticleMultimedia {\n");
+
+ sb.append(" url: ").append(toIndentedString(url)).append("\n");
+ sb.append(" format: ").append(toIndentedString(format)).append("\n");
+ sb.append(" height: ").append(toIndentedString(height)).append("\n");
+ sb.append(" width: ").append(toIndentedString(width)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" subtype: ").append(toIndentedString(subtype)).append("\n");
+ sb.append(" caption: ").append(toIndentedString(caption)).append("\n");
+ sb.append(" copyright: ").append(toIndentedString(copyright)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/api-lib/src/main/java/io/swagger/client/model/ArticleRelatedUrls.java b/api-lib/src/main/java/io/swagger/client/model/ArticleRelatedUrls.java
new file mode 100644
index 0000000..c9fe2c1
--- /dev/null
+++ b/api-lib/src/main/java/io/swagger/client/model/ArticleRelatedUrls.java
@@ -0,0 +1,122 @@
+/*
+ * Top Stories V2
+ * The Top Stories API provides JSON and JSONP lists of articles and associated images by section.
+ *
+ * OpenAPI spec version: 2.0.0
+ *
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import com.google.gson.annotations.SerializedName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+
+/**
+ * ArticleRelatedUrls
+ */
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-09-19T22:13:55.972-04:00")
+public class ArticleRelatedUrls {
+ @SerializedName("suggested_link_text")
+ private String suggestedLinkText = null;
+
+ @SerializedName("url")
+ private String url = null;
+
+ public ArticleRelatedUrls suggestedLinkText(String suggestedLinkText) {
+ this.suggestedLinkText = suggestedLinkText;
+ return this;
+ }
+
+ /**
+ * Get suggestedLinkText
+ * @return suggestedLinkText
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getSuggestedLinkText() {
+ return suggestedLinkText;
+ }
+
+ public void setSuggestedLinkText(String suggestedLinkText) {
+ this.suggestedLinkText = suggestedLinkText;
+ }
+
+ public ArticleRelatedUrls url(String url) {
+ this.url = url;
+ return this;
+ }
+
+ /**
+ * Get url
+ * @return url
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ArticleRelatedUrls articleRelatedUrls = (ArticleRelatedUrls) o;
+ return Objects.equals(this.suggestedLinkText, articleRelatedUrls.suggestedLinkText) &&
+ Objects.equals(this.url, articleRelatedUrls.url);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(suggestedLinkText, url);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ArticleRelatedUrls {\n");
+
+ sb.append(" suggestedLinkText: ").append(toIndentedString(suggestedLinkText)).append("\n");
+ sb.append(" url: ").append(toIndentedString(url)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/api-lib/src/main/java/io/swagger/client/model/InlineResponse200.java b/api-lib/src/main/java/io/swagger/client/model/InlineResponse200.java
new file mode 100644
index 0000000..65af28c
--- /dev/null
+++ b/api-lib/src/main/java/io/swagger/client/model/InlineResponse200.java
@@ -0,0 +1,107 @@
+/*
+ * Top Stories V2
+ * The Top Stories API provides JSON and JSONP lists of articles and associated images by section.
+ *
+ * OpenAPI spec version: 2.0.0
+ *
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import com.google.gson.annotations.SerializedName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.client.model.Article;
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * InlineResponse200
+ */
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-09-19T22:13:55.972-04:00")
+public class InlineResponse200 {
+ @SerializedName("results")
+ private List results = new ArrayList();
+
+ public InlineResponse200 results(List results) {
+ this.results = results;
+ return this;
+ }
+
+ public InlineResponse200 addResultsItem(Article resultsItem) {
+ this.results.add(resultsItem);
+ return this;
+ }
+
+ /**
+ * Get results
+ * @return results
+ **/
+ @ApiModelProperty(example = "null", value = "")
+ public List getResults() {
+ return results;
+ }
+
+ public void setResults(List results) {
+ this.results = results;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ InlineResponse200 inlineResponse200 = (InlineResponse200) o;
+ return Objects.equals(this.results, inlineResponse200.results);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(results);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class InlineResponse200 {\n");
+
+ sb.append(" results: ").append(toIndentedString(results)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/api-lib/src/test/java/io/swagger/client/api/StoriesApiTest.java b/api-lib/src/test/java/io/swagger/client/api/StoriesApiTest.java
new file mode 100644
index 0000000..13b51b3
--- /dev/null
+++ b/api-lib/src/test/java/io/swagger/client/api/StoriesApiTest.java
@@ -0,0 +1,41 @@
+package io.swagger.client.api;
+
+import io.swagger.client.ApiClient;
+import io.swagger.client.model.InlineResponse200;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * API tests for StoriesApi
+ */
+public class StoriesApiTest {
+
+ private StoriesApi api;
+
+ @Before
+ public void setup() {
+ api = new ApiClient().createService(StoriesApi.class);
+ }
+
+
+ /**
+ * Top Stories
+ *
+ * The Top Stories API provides JSON and JSONP lists of articles and associated images by section.
+ */
+ @Test
+ public void sectionFormatGetTest() {
+ String section = null;
+ String format = null;
+ String callback = null;
+ // InlineResponse200 response = api.sectionFormatGet(section, format, callback);
+
+ // TODO: test validations
+ }
+
+}
diff --git a/core-lib/src/main/java/info/hossainkhan/android/core/CoreConfig.java b/core-lib/src/main/java/info/hossainkhan/android/core/CoreConfig.java
index 9a2cf39..acf5714 100644
--- a/core-lib/src/main/java/info/hossainkhan/android/core/CoreConfig.java
+++ b/core-lib/src/main/java/info/hossainkhan/android/core/CoreConfig.java
@@ -1,8 +1,5 @@
package info.hossainkhan.android.core;
-import com.example.ApiCore;
-
public class CoreConfig {
public static final String NAME = "TESTING";
- public static final String LIB_DEPS = ApiCore.TEST;
}
diff --git a/mobile/src/main/java/info/hossainkhan/dailynewsheadlines/MainActivity.java b/mobile/src/main/java/info/hossainkhan/dailynewsheadlines/MainActivity.java
index 9b13ea1..0dc5c6a 100644
--- a/mobile/src/main/java/info/hossainkhan/dailynewsheadlines/MainActivity.java
+++ b/mobile/src/main/java/info/hossainkhan/dailynewsheadlines/MainActivity.java
@@ -4,7 +4,6 @@
import android.os.Bundle;
import android.util.Log;
-import com.example.ApiCore;
import com.google.firebase.crash.FirebaseCrash;
import info.hossainkhan.android.core.CoreConfig;
@@ -17,7 +16,7 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
- Log.d(TAG, "onCreate: " + ApiCore.TEST + CoreConfig.NAME);
+ Log.d(TAG, "onCreate: " + CoreConfig.NAME);
}
@Override